Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have a Sales Fact table that contains information on
Brand,Country, Sales
The Brand column has different brands A,B,C,D,E, etc... and MyBrand.
Country could be Malaysia, Vietnam, Indonesia, Thailand, Cambodia
MyBrand is sold in all the countires.
What I need is to bild a report that shows the Top 5 Brands and My Brand along with the ranking. When No country is selected, ranking will be for all the rows. When filtered by Country it should be ranked for Sales within the country.
Sample output entire table
Brand Sales Rank
A 5000 1
F 3800 2
E 2400 3
L 1200 4
M 1000 5
MyBrand 700 10
Sample output when Malaysia is filtered in the slicer
Brand Sales Rank
K 800 1
F 750 2
X 675 3
P 670 4
M 620 5
MyBrand 250 35
Notice the Rank for MyBrand changes also with respect to Malaysia.
Appreciate help from the forum.
Cheers
CheenuSing
Solved! Go to Solution.
How about you write a rankx formula that will rank the brands in the filter context. Then write a measure that returns true if Brand is in top 5 plus or is myBrand. Put this measure in report filter and filter for true
i think that will work.
How about you write a rankx formula that will rank the brands in the filter context. Then write a measure that returns true if Brand is in top 5 plus or is myBrand. Put this measure in report filter and filter for true
i think that will work.
Hi Matt,
I tried again. It works.
Thanks for the help.
Cheers
CheenuSing
Hi Matt,
I tried your approach, but get the error
cannot convert value of type text to type true/false
Any pointers please.
Cheers
CheenuSing
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 31 | |
| 28 | |
| 24 |