Forum Discussion

Easley08's avatar
Easley08
Icon for Helper I rankHelper I
1 year ago
Solved

Getting the Last purchase date in Cards

Hi,   is there a way to only show only the latest purchase based on this table i alread created the measures  but i want to show only the latest in the Card       measures :  Last Purc...
  • bhanu_gautam's avatar
    1 year ago

    Easley08 Create a measure to get the latest purchase date:

    Latest Purchase Date = MAX(Sales[Purchase Date])

     

    Create a measure to get the outlet name of the latest purchase:

    Latest Outlet Name =
    CALCULATE(
    FIRSTNONBLANK(Sales[Outlet Name], 1),
    Sales[Purchase Date] = [Latest Purchase Date]
    )

     

    Create a measure to get the purchase date of the latest purchase:

    Latest Purchase Date Display =
    CALCULATE(
    MAX(Sales[Purchase Date]),
    Sales[Purchase Date] = [Latest Purchase Date]
    )

     

    Create a measure to get the LP Year of the latest purchase:

    Latest LP Year =
    CALCULATE(
    MAX(Sales[LP Year]),
    Sales[Purchase Date] = [Latest Purchase Date]
    )