Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi guys I need your help with a calculation for a rolling year.
Here is the calculation: F% = A(currentmonth going back a year) + B (Full 12 months) - C(full 12 months) + D(full 12 months) - E(For selected month)
This calculation should be dynamic that you can display values for the 12 months.
Currently when I do it it displays the answer at a total level and not the individual months
If you are looking for running total then you could try something like this:
Running Total 2 =
VAR MaxDateInFilterContext = MAX ( Dates[Date] )
VAR MaxYearInFilterContext = YEAR ( MaxDateInFilterContext )
RETURN
CALCULATE (
[Total Sales],
FILTER (
ALL ( Dates ),
Dates[Date] <= MaxDateInFilterContext
&& Dates[Calendar Year Number] = MaxYearInFilterContext
)
)
or
Running Total =
CALCULATE ( [Total Sales], DATESYTD ( Dates[Date] ) )
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
8 | |
7 |