cancel
Showing results for
Did you mean:
Regular Visitor

## Running Total with simple value with/without filters

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.

1 ACCEPTED SOLUTION
Community Support

Hi @talk2mkn ,

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

4 REPLIES 4
Community Support

Hi @talk2mkn ,

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

Super User IV

@talk2mkn , 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])

Proud to be a Super User!

Regular Visitor

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.

Super User IV

@talk2mkn , 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

Proud to be a Super User!

Announcements