let's say I have a KPI which is a simple calculation like
SUMX(FILTER(Table;Table[Date] < Today());Table[Column])
I would like to plot a time series of the KPI's past values (for example for the first day of every month since 01-01-2014), so for instance it is enough to create a new table - Trend_Table - with two columns - DATE, KPI and calculate each row's KPI value as
SUMX(FILTER(Table;Table[Date] < Trend_Table[Date]);Table[Column])
(it may not exactly work that way in DAX but you get the idea)
The problem is I really want to have online values, which means that once the September begins a new row with DATE = '01-09-2018' should be added automatically to the table 'Tren_Table'.
Is it possible in Power BI? Any referalls greatly welcomed.
Related
I am trying to create a % of sales measure in power bi. I currently have a visual that is filtered on sales for select items by day and another visual that just has the total sales by day and then I export and do the math in excel. I know there is a way to have just one visual give me the % of sales for the items I have selected, but can't figure out the DAX formula. I am looking for the formula that will take sales for item 1 on Monday of $3,461 and divide by total sales for Monday of $163,534 to get a 2.1% of sales (for all items). Thanks
Power Bi Visuals
I tried a couple formulas but was unsuccessful..
The December release of PBI has been pushed out to all users, and it comes with a brand-new WINDOW function. This allows you to create calculations that would be relative to data being displayed in the visualization rather than applying across an entire table.
Some things you can do with this type of DAX calculation:
Moving averages
Can also combine with parameters for additional functionality!
Dynamic reference lines
Cross row calculations
Finding best and worst performers (with ABS references)
Calculate contributions to the whole
Relevant links:
https://www.youtube.com/watch?v=eib5X5xRlz8
Introducing DAX Window Functions (Part 1) – pbidax (wordpress.com)
WINDOW – DAX Guide
I need your help regarding Power BI because I'm quite new with it. I'm struggling to compute and show what I want.
I have imported my table from a database.
What I want is to compute the sum of the Nominal for each Counterparty and each Currency, BUT it needs to respect the condition: start date <= date in the date table & end date > date in the date table. At the end, I want to show the result just like the last image, a dynamic table.
Moreover, after computing the sum of the nominal, I need to compute the difference between two dates and the % variation of it.
On my side, I was able to get the sum I want but the problem is I created columns for each counterparty and currency like 'AZE EUR', 'AZE USD', in the Date table.
BY doing this, I can't create a pie chart that defines the % of EUR or USD owned by AZE and HUB counterparties. So no dynamic chart.
I hope I was clear enough. If not let me know :)
Thank you in advance for all your helps.
NB: if the image can't be seen, let me know.
I am a new user of Power BI and I was wondering if it is possible to calculate the date difference that is present in two different tables but they both are connected to the third table in which I want to create a measure or a column using dax to calculate date difference:
The columns marked in red are dates and I want their difference to be calculated in the assumption table. I used the month number to build the relationship between these tables.
You can use a Measure as below-
date_diff =
DATEDIFF(
RELATED(d_nl[notification]),
RELATED(d_fc[file_closure_date]),
DAY
)
To know about other Intervals rather than DAY, you can visit Here.
I am trying to create a Dynamic Table in Power BI.
I have my set of data, and basically I want the calendar to pick up the minimum date and the maximum date from my table, but only if the maximum date is not the month of today. If the maximum date is the month of today, then it should ignore it and the calendar should be created with the max date of the previous month.
I started the formula, but can't seem to continue it. Any ideas?
Calendar_= CALENDAR(MIN('Table1'[Date]),IF(MONTH(MAX('Table1'[Date]))=MONTH(TODAY()),date(YEAR(MAX('Table1'[Date])),.....
See if this post helps: https://community.powerbi.com/t5/Desktop/Dynamic-table-or-on-fly-table-generation-via-DAX/m-p/434397#M200275. If not, I would simplify by creating some additional calculated columns or measures and then reference those instead of one nice big formula
I am trying to do some time based calculations on my budgeting data but struggling to understand where I'm going wrong or if my data structure would even support what I'm trying to do.
As per the image above, this is my raw data. ie. A monthly budgeted and actual total for each cost centre that is being imported from an excel spreadsheet.
I am trying to calculate a YTD budget and YTD Actual figure per cost centre based on the monthly totals. Ideally I would like all of this data displayed in a table that I can then use slicers to segment/pivot.
When using the CALCULATE() function in a measure, I am unable to select my cell value for each date and cost centre.
eg.
YTD Actual = CALCULATE( [Actual MTH] , DATESYTD('Dates'[Date], "30/6"))
returns the error
The value for 'Actual MTH' cannot be determined. Either 'Actual MTH'
doesn't exist, or there is no current row for a column named 'Actual
MTH'.
Any assistance with getting a greater understanding of the issue here would be appreciated.
Thanks
Try something like this for your measures:
YTD Actual = TOTALYTD(sum([Actual MTH]),'Dates'[date],ALL('Dates'[date]),"30/6")