Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I have trying to calculated running Total (Count of Records) using quick measure and RankX but unable to achive my view. Please refer attached power BI file. I want use DAX as I need to use this data with other tables for my trends.
Solved! Go to Solution.
Hi @Anonymous ,
You can use the following measure instead of use rankx:
Measure = CALCULATE(COUNT(Sheet1[Species]),FILTER(ALLEXCEPT(Sheet1,Sheet1[Species]),Sheet1[Date]<=MAX(Sheet1[Date])))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @Anonymous ,
You can use the following measure instead of use rankx:
Measure = CALCULATE(COUNT(Sheet1[Species]),FILTER(ALLEXCEPT(Sheet1,Sheet1[Species]),Sheet1[Date]<=MAX(Sheet1[Date])))
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous , there is no file link
Example of running total
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(Sales),Sales[Sales Date] <=max(Sales[Sales Date])))
Rank
Geography Rank = RANKX(all(Geography[City]),[Sales])
Geography Rank = RANKX(all(Geography),[Sales])
City and ID Rank = RANKX(all(Geography[City],Geography[City Id]),[Sales])
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
Hi Amit,
But I have filter on Species Column but not on Date. When I apply Filters Its working as expected but when I select ALL in Filters its gving me wrong values.
My Data Contains - Date, Species, Test(Index) Columns.
@Anonymous , I created a measure like this, and seem to be working, One you had was a column
Measure = CALCULATE(COUNT(Sheet1[Species]), FILTER(ALLSELECTED(Sheet1), Sheet1[Date]<=max(Sheet1[Date])))
File is attached after signature
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 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |