Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hello,
I have a data set with 3 weeks of sales data for products. I need to rank the products by the latest week's sales only and I still need to be able to display the sales totals for the other weeks as well.
Below is a simplified version of the data set. I want to rank the products based on the highlighted info.
Here's the output I'm trying to get to:
Any suggestions would be greatly appreciated!
@Anonymous , Create a measure like this and create Rank on that. Better to separate date table
Last Week =
var _max = maxX(allselcted('Date'), 'Date'[Week Rank])
return
CALCULATE(sum('order'[Qty]), FILTER(('Date'),'Date'[Week Rank]=_max))
or
Last Week =
var _max = maxX(allselcted('Date'), 'Date'[Week Rank])
return
CALCULATE(sum('order'[Qty]), FILTER(ALLselected('Date'),'Date'[Week Rank]=_max))
or
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
112 | |
112 | |
105 | |
94 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |