Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I would like to create a measure that will show the Global last sales date for each category regardless of the last sales date of that particular category.
That is if my last sales date is today, 15/03/2022, I would like to show this date on every category, regardless if they have sales or not or if their last sales < 15/03/2022. I have Sales table and a calendar table.
Category | Last Sales Date | Global Last Sales Date |
A | 15/03/2022 | 15/03/2022 |
B | 1/03/2022 | 15/03/2022 |
C | 1/02/2021 | 15/03/2022 |
D | 14/03/2022 | 15/03/2022 |
What's the formula to arrive at column C. Thanks in advance.
Solved! Go to Solution.
The earlier answers may work great. If your date table is named Dates and your sales measure is Total Sales = SUM(Table[Sales Amt]
Then the measure is,If needed
Thanks for your suggestion. However, it didn't work. It's returning the last sales date of a particular category.
The earlier answers may work great. If your date table is named Dates and your sales measure is Total Sales = SUM(Table[Sales Amt]
Then the measure is,If needed
Hello Whitewater,
This somehow works down to the last subcategories I have. Thank you.
Hello,
You can try the following measure:
M_Last_Sales_Date =
VAR _lastSalesDateGlobal = MAX(Table[Last Sales Date Global])
RETURN
CALCULATE(_lastSalesDateGlobal,ALLSELECTED(Table[Last Sales Date Global]))
I hope this will help.
Hi tamdo95,
Thank you for your suggestion. However, this formula returns the last date of sales for a particular category
Hi, try this formula:
Hi Pi Eye,
Thank you for your suggestion. It worked on the main categores i.e. A, B, C, D. However, I have sub-categories which I have not mentioned in my original post and it didn't work for them.
@ZipCan Hi!
Try with this measure:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
37 | |
25 | |
19 | |
14 | |
8 |
User | Count |
---|---|
69 | |
48 | |
44 | |
19 | |
15 |