Forum Discussion

Nagesh20's avatar
Nagesh20
Icon for Helper I rankHelper I
2 years ago
Solved

Seperate value from running total measure based on max date

Hi all,   I am able to calculat the running total based on max date. I would like to get final number from running total measure based on the max date. I have attached below example (i.e . Total va...
  • amitchandak's avatar
    2 years ago

    Nagesh20 ,  Create a measure using your measure

     

    if(Max(Calendar[Date]) = maxx(filter(allselected(Table), Table[Product] = max(Table[Product]) ), Table[Date]) , [Cumulative (running total measure) ], blank()) 

     

    or

     

     

    Measure =
    var _max =maxx(filter(allselected(Table), Table[Product] = max(Table[Product]) ), Table[Date])
    return
    Switch ( true(),
    Max(Calendar[Date]) = _max , [Cumulative (running total measure) ],
    Max(Calendar[Date]) < _max , 0 ,
    blank())