Forum Discussion
create chart that accumulates values over date
- 3 years ago
HI
thanks for clarifying
have updated this file: https://1drv.ms/u/s!AkGuKJKxOlnAeqVqsn2-BsSfKWM?e=n2BZNW
this is the measure:
cumulative total =VAR LastVisibleDate =MAX ( 'Table'[Dates] )VAR FirstVisibleDate =MIN ( 'Table'[Dates] )VAR LastDateWithSales =CALCULATE (MAX ( 'Table'[Dates] ),REMOVEFILTERS () -- Use ALL ( Sales ) if REMOVEFILTERS () and ALL ()-- are not available)VAR Result =IF (FirstVisibleDate <= LastDateWithSales,CALCULATE ([value],'Table'[Dates] <= LastVisibleDate))RETURNResultrefernce article : Cumulative total – DAX Patterns - Anonymous3 years ago
Hi eliasayyy ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a measure.
Measure = VAR _MAX=MAXX(ALLSELECTED('Table'),'Table'[DATE]) VAR _MIN=MINX(ALLSELECTED('Table'),'Table'[DATE]) RETURN CALCULATE(SUM('Table'[VALUE]),FILTER(ALL('Table'),'Table'[DATE]<=SELECTEDVALUE('Table'[DATE])&&'Table'[DATE]>=_MIN&&'Table'[DATE]<=_MAX))The value would change by the date.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ PollyIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi eliasayyy ,
I have created a simple sample, please refer to my pbix file to see if it helps you.
Create a measure.
Measure = VAR _MAX=MAXX(ALLSELECTED('Table'),'Table'[DATE])
VAR _MIN=MINX(ALLSELECTED('Table'),'Table'[DATE])
RETURN
CALCULATE(SUM('Table'[VALUE]),FILTER(ALL('Table'),'Table'[DATE]<=SELECTEDVALUE('Table'[DATE])&&'Table'[DATE]>=_MIN&&'Table'[DATE]<=_MAX))
The value would change by the date.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.