Forum Discussion

FZOU's avatar
FZOU
Helper IV
6 years ago
Solved

Running total

Hello community,

 

I need your help lease is such a problem i'm calculating a running total it's work fine but with a weird comportment.

Until the above picture everything is ok but when i move the filter to start from 15/02/2018 the cumul column ignoer the value of 01/02/2018 and start from 1200 like the picture below

 

my desired result is if i move the slicer is still take the value of previous date like this table below, i need your help and thank you

Sales DateDemandQtCumul
15/02/201812002200
24/02/201815003700
15/04/201810004700
Total47004700

 

this is my formula : 

Cumul = CALCULATE(SUM(Demand[DemandQt]);FILTER(ALLSELECTED(demand);Demand[Sales Date]<=max(Demand[Sales Date])))
  • FZOU 

    if you use allselected it will take the selected dates , you can use all or datestyd as per need

     

    Cumul = CALCULATE(SUM(Demand[DemandQt]);FILTER(ALL(demand);Demand[Sales Date]<=max(Demand[Sales Date])))

    Cumul = CALCULATE(SUM(Demand[DemandQt]);datesytd('Date'[Date])

    Cumul = CALCULATE(SUM(Demand[DemandQt]);datesytd('Date'[Date],"1/31")// force year from Feb

3 Replies