Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |