Forum Discussion

Stuznet's avatar
Stuznet
Helper V
6 years ago

MAX Function is Not Working

Hi guys,

I'm scratching my head at the moment, the MAX function I've created, the count does not match with the Excel MAX from the pivot.

Here is the Excel 

Here is the PBI report

Max_Export_Seq = CALCULATE(MAX([Export_Seq]),ALLEXCEPT(Data,Data[CustomerKey]))
Max_order_Date = CALCULATE(MAX([OrderDate]),ALLEXCEPT(Data,Data[CustomerKey]))

 

 

 

Could you please assist?

 

Thank you

1 Reply

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi Stuznet ,

     

    Is this the end result you want? 

     

    And you want to know why the result  in Power BI is different from the the result in Excel?

    Because:

    Max_Export_Seq = CALCULATE(
        MAX([Export_Seq]),
        ALLEXCEPT(Data,Data[CustomerKey])
    )

    is not equal 


    You can export data from Power BI:

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.