Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Here are my data:
Here is my tentative
#qty cumul = CALCULATE(SUM('data a7017'[qty]),FILTER(ALLSELECTED('data a7017'[date]),'data a7017'[date] <= MAX ('data a7017'[date])))
and
I am trying to cumulative sum over month / year ie:
So definitely my measure is not correct, someone to give me a help?
Best
JM
Solved! Go to Solution.
As a final post for that thread here is the correct measure
#qte cumul = CALCULATE(
[#qte]
, FILTER (ALLSELECTED('Datekey'), 'Datekey'[Date] <= MAX ( 'Datekey'[Date] ))
)
Hi @jmgobet ,
Glad to hear this problem has been solved. Please accept your reply as the solution. Your contribution is highly appreciated.
Best Regards,
Icey
@jmgobet , In case of cumulative, always prefer to have Date table
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=max(Sales[Sales Date])))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(date,date[date] <=maxx(date,date[date])))
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.
i have done as suggested, it is ok for the sample but not for the database?!?
I have screencasted my screen in order to better explain/
Best
JM
As a final post for that thread here is the correct measure
#qte cumul = CALCULATE(
[#qte]
, FILTER (ALLSELECTED('Datekey'), 'Datekey'[Date] <= MAX ( 'Datekey'[Date] ))
)
Hi @jmgobet ,
Glad to hear this problem has been solved. Please accept your reply as the solution. Your contribution is highly appreciated.
Best Regards,
Icey
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
102 | |
84 | |
79 | |
70 |
User | Count |
---|---|
120 | |
110 | |
95 | |
82 | |
77 |