Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Max year is not working

Dear all,

 

I am calculating max year sales so i used the below the dax

CYSales = CALCULATE(SUM(Dispatch[InvoiceAmount]),FILTER('Calendar',MAX('Calendar'[Year])))

but its getting me the total sales value.when i select 2018 year in slicer the value is changing.Pls correct me where i am wrong.

 

Regards,

Joshua.

  • Anonymous's avatar
    Anonymous
    7 years ago

    i got the solution

     

    CYSales = CALCULATE(SUM(Dispatch[InvoiceAmount]),FILTER('Calendar','Calendar'[Year]=MAX('Calendar'[Year])))

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    i got the solution

     

    CYSales = CALCULATE(SUM(Dispatch[InvoiceAmount]),FILTER('Calendar','Calendar'[Year]=MAX('Calendar'[Year])))