The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now
Hi,
I need help with Top 5 sales. My power table looks like the first table. I need to transform the data as the second table that shows top 5 sales and rest is categorised under others
Solved! Go to Solution.
Hi @Lionel_Charley ,
Create below 2 calculated columns:
Place Rank =
RANKX(
ALL('Sales by Place'[Place]),
CALCULATE(
SUM ( 'Sales by Place'[Sales]),
ALLEXCEPT('Sales by Place', 'Sales by Place'[Place])
)
)
New Place =
IF(
'Sales by Place'[Place Rank] >= 1 && 'Sales by Place'[Place Rank] <= 5, 'Sales by Place'[Place],
"Others"
)
Let me know if you require the .pbix.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
Thank you all for the support
Hi @Lionel_Charley ,
Create below 2 calculated columns:
Place Rank =
RANKX(
ALL('Sales by Place'[Place]),
CALCULATE(
SUM ( 'Sales by Place'[Sales]),
ALLEXCEPT('Sales by Place', 'Sales by Place'[Place])
)
)
New Place =
IF(
'Sales by Place'[Place Rank] >= 1 && 'Sales by Place'[Place Rank] <= 5, 'Sales by Place'[Place],
"Others"
)
Let me know if you require the .pbix.
Give a Thumbs Up if this post helped you in any way and Mark This Post as Solution if it solved your query !!! Proud To Be a Super User !!! |
you need to watch this
https://www.sqlbi.com/articles/showing-the-top-5-products-and-others-row/
Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.
User | Count |
---|---|
158 | |
109 | |
96 | |
83 | |
75 |
User | Count |
---|---|
154 | |
137 | |
131 | |
81 | |
62 |