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.
Hi Team,
From the following data i need to create a top 7 sales items and remaining should be keep it as others.Please let me know what is the formula to calcualte this.
Item | Sales |
pepsi | 25000 |
coc | 15000 |
macintosh | 5800 |
cadburry | 2500 |
7up | 1500 |
dew | 4500 |
expresso | 6900 |
oreo | 4500 |
Almond t | 450 |
cool bites | 1250 |
abc bis | 4560 |
Expected output
pepsi | 25000 |
coc | 15000 |
expresso | 6900 |
macintosh | 5800 |
abc bis | 4560 |
dew | 4500 |
oreo | 4500 |
others | 5700 |
Solved! Go to Solution.
the only way I know to do this is to create a calculated column, grouping the non top 7 into 'others' bucket
Item2 = VAR ItemRank = RANK.EQ('Table'[Sales],'Table'[Sales]) RETURN IF(ItemRank<=7,'Table'[Item],"other")
EDIT - syntax
the only way I know to do this is to create a calculated column, grouping the non top 7 into 'others' bucket
Item2 = VAR ItemRank = RANK.EQ('Table'[Sales],'Table'[Sales]) RETURN IF(ItemRank<=7,'Table'[Item],"other")
EDIT - syntax
@Stachu thank you for the reply.I just got it by using the same lofic by using the RANKX function,
Thank you.
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 |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |