cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
CheenuSing
Community Champion
Community Champion

Build report to show Top 10 brands and MyBrand

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

 

 

 

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
1 ACCEPTED 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. 



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

3 REPLIES 3

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. 



* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

Hi Matt,

 

I tried again.  It works.

 

Thanks for the help.

 

Cheers

 

CheenuSing

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

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

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors