Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
My team wants to analyze their sales data using Power BI. They have already loaded their data into Power BI, and they want to calculate the sales performance of their top 10 products over the past year. How can we do this?
Hi @bilibi2928
Would the following 2 measures help?
Last Year =
CALCULATE(
[Sales],
DATESBETWEEN(
'Date'[Date],
DATEADD( LASTDATE( 'Date'[Date] ), -1, YEAR ),
LASTDATE( 'Date'[Date] )
)
)
Rankx =
RANKX(
ALL( 'Product' ),
[Last Year],
,
DESC
)
[Rankx] can be used to filter a visual.
Let me know if this helps.
User | Count |
---|---|
93 | |
83 | |
77 | |
73 | |
66 |
User | Count |
---|---|
115 | |
104 | |
93 | |
64 | |
61 |