Forum Discussion

chat_peters's avatar
chat_peters
Helper III
3 years ago
Solved

Total for Max Month

I have a power bi table visual that looks like this(link)  When I try to calculate the Total Cost for Max available month, the calculation automatically reverts to the last month (YY-MMM) with data ...
  • Legend_11's avatar
    3 years ago
    Measure = CALCULATE(sum(TOTALTRY[Total]),filter('Date','Date'[Month]= MAX('Date'[Month])))

    Try this one, you need to do sum first then apply filter on month

    note:  if date is from same table

    Measure = CALCULATE(sum(TOTALTRY[Total]),filter('TOTALTRY','TOTALTRY'[Month]= MAX('TOTALTRY'[Month])))