Forum Discussion
Anonymous
5 years agoNot 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
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?
3 Replies
- V-lianl-msft
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?- AnonymousNot applicable
Thanks for the reply, this is working now
- AnonymousNot applicable
Hi Anonymous
Is the screenshot showing the result of current measure? Can you provide some sample data in a format we can copy?