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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Cumulative Total on a Calculated Measure where data is not null With in a specific Data range

 

Hi Gurus,
Need a help on below,

I ned to caluculate Cumulative Total on a Calculated Measure per each Category and Country wher the data is not null With in a specific Data range

In the below example 
my Current DAX is here 

C Total=
CALCULATE (
DISTINCTCOUNT('Table'[ID] ),
FILTER (
'Table',
AND( 'Table[IsAccountActive] <> "False", 'TAble'[Flag]="True")),'Table'[opted]>0,'Table'[ID]<>BLANK()
)
 
I need this formula to be Cummlative total eg: in below screen shot ,
Expected result :
For USA and SAles with in Column E ,
Row 10 should be 18,
Row 11 should be 33,
row 12 should be blank as it does not have a value 
should folow same for remaining
Dimpu_1-1618142260006.png

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Please try this measure:

Measure 2 = CALCULATE(SUMX(FILTER('Table',COUNTROWS(FILTER('Table','Table'[Category]=EARLIER('Table'[Category])&&'Table'[Country]=EARLIER('Table'[Country])&&'Table'[Date]>=EARLIER('Table'[Date])))),[Measure]))


If the problem persists,could you share the sample pbix with dummy data?

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 

View solution in original post

3 REPLIES 3
V-lianl-msft
Community Support
Community Support

Please try this measure:

Measure 2 = CALCULATE(SUMX(FILTER('Table',COUNTROWS(FILTER('Table','Table'[Category]=EARLIER('Table'[Category])&&'Table'[Country]=EARLIER('Table'[Country])&&'Table'[Date]>=EARLIER('Table'[Date])))),[Measure]))


If the problem persists,could you share the sample pbix with dummy data?

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-... 

Anonymous
Not applicable

Thanks for the reply, this is working now

Vera_33
Resident Rockstar
Resident Rockstar

Hi @Anonymous 

 

Is the screenshot showing the result of current measure? Can you provide some sample data in a format we can copy?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors