Forum Discussion
Issue with accumulated amounts
- Anonymous1 year ago
Hi gomezc73 ,
Thanks for rajendraongole1 reply.
You can create a calculate columnDaily Accumulated = VAR _currentDate = 'Table'[DATE] RETURN CALCULATE( SUM('Table'[AMOUNT]), FILTER( 'Table', 'Table'[DATE] <= _currentDate ) )Then create a line chart
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi gomezc73 - you need a measure in Power BI that calculates the correct daily accumulated amount while respecting the user's weekday selection.
Create a measure for the total running accumulation
Total Running Accumulated =
CALCULATE(
SUM('Table'[AMOUNT]),
FILTER(
ALL('Table'),
'Table'[DATE] <= MAX('Table'[DATE])
)
)
Create another measure to filter for the selected weekday
Correct Daily Accumulated =
IF(
MAX('Table'[Week Day]) IN VALUES('Table'[Week Day]),
CALCULATE(
SUM('Table'[AMOUNT]),
FILTER(
ALL('Table'),
'Table'[DATE] <= MAX('Table'[DATE])
)
)
)
Now, add a slicer for the Week Day column: Use the Week Day column as a slicer so users can select the desired weekday.
use a line chart:
Add the DATE column to the X-axis.
Use the Correct Daily Accumulated measure for the Y-axis. Hope this works.
- gomezc731 year ago
Helper V
Hi, thank you for your early response. I tried your solution but i am still showing wrong amounts.
Is it possible for you create a PBI and send me it?. maybe i am making something wrong.
thanks in advance