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
Mayoman
New Member

Show lowest 5 in a Table

Hello everyone,

im currently working in PowerBI and trying to solve a little problem...

Im Working in a Table Called "Lieferantenübersicht" in which are a lot of Columns. Now i just want to show the lines which include the Numers 1 to 5 (Column Name "Rating")

--> I want to show the lowest 5 suppliers out of 30 suppliers in a Table. I already rated every one and gave him a rating between 1 (bad) and 30 (very good)

How do i fix the Problem? I would like to use a measure and not a visual filter

1 ACCEPTED SOLUTION

@Mayoman Well, you could do this:

Measure = 
  VAR __Ranking = MAX('Table'[Ranking])
  VAR __Result = IF(__Ranking < 6, " ", BLANK())
RETURN
  __Result

Bottom line, if you don't want a visual filter involved at all (not sure why not since a top N filter would do this marvelously) then you have to have a measure that returns *something* for the cases you want to show and otherwise return BLANK(). If you put the supplier name in a table along with this measure then only the rows that return *something* will show.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Mayoman Maybe:

Measure = 
  VAR __Ranking = MAX('Table'[Ranking])
  VAR __Result = IF(__Ranking < 6, "Bad", BLANK())
RETURN
  __Result

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 
Thank you, but i dont want to show "bad" in Table. I just want to Show the suppliers with the rating 1-5 in the Table. The other 25 suppliers should not be seen in the Table after the measure

@Mayoman Well, you could do this:

Measure = 
  VAR __Ranking = MAX('Table'[Ranking])
  VAR __Result = IF(__Ranking < 6, " ", BLANK())
RETURN
  __Result

Bottom line, if you don't want a visual filter involved at all (not sure why not since a top N filter would do this marvelously) then you have to have a measure that returns *something* for the cases you want to show and otherwise return BLANK(). If you put the supplier name in a table along with this measure then only the rows that return *something* will show.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.