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
geor_2011
Regular Visitor

visual level filter filtering incorrectly

Hello,

 

I have set up a TOP N slicer as a filter, using the technique displayed in this video https://www.youtube.com/watch?v=SsZseKOgrWQ

 

This all works fine, up until I try to omit the rows which do not comply with the selected TOP N value. 

 

So if I select Top 5, I have a column indicating all the rows complying to the top 5. The rest of the rows are blank. I have gone into visual filters and applied a filter on this column to show all the rows which are non-blank. Upon applying this filter, it does not show me the Top 5, but another breakdown of the table (for example the first 2).

 

I'm trying to paste in some pictures as examples, but I'm new on this. Not really surt hwo to post this.

2 REPLIES 2
Greg_Deckler
Super User
Super User

Can you explain exactly how you "one into visual filters and applied a filter on this column to show all the rows which are non-blank."

 

I'm also not understanding why you would filter via Top N and then try to display blank rows. When I do an Enter Data Query with a Column1 from 10-1 (10 rows) and use a Top N Visual Filter with 5 I only see the top 5 rows in my table visualization. Sounds like you are doing something different but I can't figure out what.


@ 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...

Okay so below you can see the table

Table.JPG

 

The measure "measure value" is created like: 

  •  Measure Value = if([Rank]<=[Selected Top N],[Rank],BLANK())

 

[Selected Top N] is the number corresponding to the selection in the TOP N filter (so 5 if Top 5 is chosen, etc).

  • * Selected Top N = if(HASONEVALUE(TopNTable[TopN]),VALUES(TopNTable[TopNValues]),MAXX(ALLSELECTED(Sheet1),[Rank]))

TopNTable is the table below

 topN.JPG

 

As you can see, when choosing top 5, the measure value column does what I'm expecting it to. I want to get rid of the rows where the measure value is blank. In order to do this, I apply a visual filter on "measure value is not blank". But then this happens:

 

example2.JPG

 

I want to implement the filter in this format, to give the end user with the flexibility to choose which top N they want to see.

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.