Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I want to get the commulative total of last year's data until december 31 only, regardless of the current month/year I selected in the charts.
Below is the formula I used to get the commulative total up to selected date.
CALCULATE([Nominal Accounts], FILTER(ALLSELECTED(Dates[Date]), Dates[Date] <= MAX(Dates[Date])))
Hi @JazZ0003 ,
Please try this:
lastyear = CALCULATE(SUM(financials3[Sales]),DATEADD(financials3[Date],-1,YEAR))
Running total = CALCULATE([lastyear],FILTER(ALL(financials3),financials3[Date] <= MAX(financials3[Date])))
thank you @v-xuding-msft
But most of your solutions focused on previous year only. I need to compute the running total since from the beggining of data, not only previous year.
This is what I want to acheive, running total from all the data from all prevous year upto last year december.
This would be the outcome.
https://drive.google.com/file/d/1ka6IgcOauj1dNck3M9rawsHewF-kHxIJ/view
@JazZ0003 , something like this with date table
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))
This year
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-Y...
Appreciate your Kudos.
Hi @JazZ0003 ,
Try this measure
Sales YTD = CALCULATE( [Nominal Accounts], DATESYTD( 'Date'[Date] ) )
https://www.sqlbi.com/articles/computing-running-totals-in-dax/
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
User | Count |
---|---|
123 | |
76 | |
62 | |
50 | |
50 |
User | Count |
---|---|
175 | |
125 | |
60 | |
60 | |
58 |