Forum Discussion

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

Last Order Date and Age

Hi all,   I have a table of data that runs for each day from 2022 to 2024. Within this table, there could be multiple lines for Company Names, which each have a date attached. I can create a table ...
  • mh2587's avatar
    1 year ago

    Create a Measure to Get the Latest Order Date:

    Latest Order Date = MAX('Margin Reports'[DATE])
    

    Calculate Days Since the Latest Order:

    Days Since Last Order = 
    DATEDIFF([Latest Order Date], TODAY(), DAY)
    

    Filter the Data for the Last 6 Months:

    Orders Older Than 6 Months = 
    IF([Days Since Last Order] > 180, 1, 0)
    

    Add Filters to the Table Visual:

    • Place Company Name and [Latest Order Date] in the table visual.
    • Add [Days Since Last Order] as a column to display the calculated days.
    • Use the [Orders Older Than 6 Months] measure in the visual-level filter and set it to 1 to display only companies that haven’t ordered in the last 6 months.