Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
OsmanEmi
Frequent Visitor

Bottom N showing more than specified value

Hi,

 

I'm using the bottom N filter on a bar graph to show the least preforming entities(shops/profit).

However I only want to filter bottom N by shops that is not 0.

 

I tried using a filter that says must be above 0 but it only shows 6 entites of shops and filters out the other 4 due to their value being 0.

 

For example in the below table i would not like to show the shop that is 0 on profit but would still want the bottom 3

E.g

 

 

shop idprofit
shop 1£500
shop 2£400
shop 3£100
shop 40

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@OsmanEmi , Create measure like

profit measure =sumx(values(Table[shop id]), if(calculate(sum(Table[profit]))>0,calculate(sum(Table[profit])), blank()))

bottom profit measure = CALCULATE([profit measure],TOPN(10,all(Table[shop id]),[profit measure],asc),VALUES(Table[shop id]))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@OsmanEmi , Create measure like

profit measure =sumx(values(Table[shop id]), if(calculate(sum(Table[profit]))>0,calculate(sum(Table[profit])), blank()))

bottom profit measure = CALCULATE([profit measure],TOPN(10,all(Table[shop id]),[profit measure],asc),VALUES(Table[shop id]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.