Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
RahulYadav
Resolver II
Resolver II

Cumulative Total with Slicers & Same values in COUNT

Hi All,

I am working on a Cumulative Count which will be filtered using Two Slicers. Below the desired Result.

 

2019-11-07_18-35-14.png

I have added a Measure which calculates the Cumulative Total. But, when it comes to Same values in Count column it adds up both the values to the above value. Below is the Dax I have used.

 

 

 

Cumulative Total = 
var _CurrCount = COUNT(Sheet1[Ticket])
var _sumTable = SUMMARIZE(ALLSELECTED(Sheet1),Sheet1[Category],"Count",COUNT(Sheet1[Ticket]))
var _CumulativeCount = SUMX(FILTER(_sumTable,[Count]>=_CurrCount),[Count])
Return
_CumulativeCount

 

 

2019-11-07_18-38-12.png

 

PBIX: Cumulative Total 

 

Thanks,

Rahul

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @RahulYadav ,

 

Here is the formula for Cumulative Total as a Measure.

 

Measure = 
    CALCULATE(
        SUM('Table'[Ticket]),
        FILTER(
            ALLSELECTED('Table'),
            ISONORAFTER('Table'[Category], MIN('Table'[Category]), ASC)
        )
    )

 

Cumulative.PNG

And as you can see it works.

 

Best Regards,

Liang 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @V-lianl-msft !!

It is not working for the count in descending order.

We need to sort the Count in Descending Order. In your case the category is sorted & Count does not have same values.

 

If you check my screenshot. I have two categories with Same Count and Count is sorted in descending Order.

 

I have attached the Sample PBIX file to my original post.

 

Thanks,

Rahul

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.