Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Last Date Order

Hi, 

I tried to get the last Date of order of each Customer ID by using formular : LASTDATE()

Last Date Purchaes = LASTDATE(Orders[Order Date].[Date])

but it gave me the duplicate last date of order of each customer id. 

 

here is the result: 

 

the data set using is: sample_superstore. 

 

 

Hope to hear from you. 

thanks!!

  • Anonymous 

     

    Yes, You can not use a MEASURE in SLICER

     

    But you can add a calculated column as follows. Then use it in slicer

     

    Column = CALCULATE(max(Orders[Order Date]),ALLEXCEPT(Orders,Orders[Customer ID]))

4 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Hi Anonymous 

     

    In the picture it seems you added this formula as calculated column

     

     

    Use a MEASURE instead

     

    Measure = LASTDATE(Orders[Order Date])

    or

    Measure = MAX(Orders[Order Date])

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

       

      Thank you for your solution. 

       I works now!! 

      • Zubair_Muhammad's avatar
        Zubair_Muhammad
        Community Champion

        Anonymous 

         

        Yes, You can not use a MEASURE in SLICER

         

        But you can add a calculated column as follows. Then use it in slicer

         

        Column = CALCULATE(max(Orders[Order Date]),ALLEXCEPT(Orders,Orders[Customer ID]))