Forum Discussion
Rich_Wyeth
Helper I
1 year agoLast 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 ...
- 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 Nameand[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 to1to display only companies that haven’t ordered in the last 6 months.
- Place
mh2587
Super User
1 year agoCreate 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 Nameand[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 to1to display only companies that haven’t ordered in the last 6 months.
Rich_Wyeth
Helper I
1 year agoThank you! I hadn't done quite enough Measures. This works a treat.