Forum Discussion

gunjan80's avatar
gunjan80
Microsoft Employee
6 years ago
Solved

Filter using last date not working

I have a Sales table. I am trying to get the sale amount as per the last sale quarter.   I've tried, using 'LastDate' function. It works independantly  but it does not work with the filter combinatio...
  • gunjan80's avatar
    gunjan80
    6 years ago

    I fixed this. Here is the DAX.

     

    Last Sale Amount2 = CALCULATE(sum(Table1[Sales]), All('Date'[Quarter]), CALCULATETABLE(LASTDATE(Table1[Date]),ALLEXCEPT(Table1, 'Table1'[Customer Name]) ))