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.
I have a table which contains Product,Sales and Date column.
I want to create a measure which will give me the best selling day for the particular product.
My table has values like,
Product | Sales | Date |
Dell | 20000 | 14-06-2021 |
HP | 45555 | 20-01-2020 |
Toshiba | 68888 | 12-08-2020 |
I first created a measure for Average Sales Per day using
Solved! Go to Solution.
Okay, I have solved this thing.
1)I first created a measure for 'Average Sales per Day" as
Average Sales Per Day =
AVERAGEX(VALUES(Sheet1[Date].[Date]),[Total Sales]).
2)Then I calculated 'Best Selling Date' as,
Best Selling Date =
MAXX(
TOPN(1,
SUMMARIZE(Sheet1,Sheet1[Date].[Date],
"Selling Days",[Average Sales Per Day]),
[Selling Days]),
Sheet1[Date].[Date]
)
Here I got the best selling date and not the actual Date.
3)So I converted it into dddd format as
Best Selling Day =
FORMAT([Best Selling Date],
"dddd")
This gives me the Best Selling Day.
Regards,
Sanket Bhagwat.
If this post helps, then please mark it as 'Accept as Solution".
Okay, I have solved this thing.
1)I first created a measure for 'Average Sales per Day" as
Average Sales Per Day =
AVERAGEX(VALUES(Sheet1[Date].[Date]),[Total Sales]).
2)Then I calculated 'Best Selling Date' as,
Best Selling Date =
MAXX(
TOPN(1,
SUMMARIZE(Sheet1,Sheet1[Date].[Date],
"Selling Days",[Average Sales Per Day]),
[Selling Days]),
Sheet1[Date].[Date]
)
Here I got the best selling date and not the actual Date.
3)So I converted it into dddd format as
Best Selling Day =
FORMAT([Best Selling Date],
"dddd")
This gives me the Best Selling Day.
Regards,
Sanket Bhagwat.
If this post helps, then please mark it as 'Accept as Solution".
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 |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |