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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Chrisjr
Helper IV
Helper IV

Top/Bottom filter not working properly

Hello All, 

 

I have the following visual :

Chrisjr_0-1701094602103.pngChrisjr_3-1701094826411.png

 

 

When I selecet the top 3, the Ranking var mesrure in the last column gives me the result of the top 3. same for the bottom 3.

 

The problem is when I select a district in the filter "N distric"(each Dealer/Group Name belong to a District number)  , it gives me the top 3 but no values for  the bottom 3 . See below:

Chrisjr_1-1701094749046.pngChrisjr_2-1701094772336.png

 

 

 

My data model :

Chrisjr_4-1701095390681.png

 

 

The dax for the Ranking var is : 

Ranking var =
VAR _TopDealer = RANKX(ALL(Dim_dealers[Dealer/Group Name]), [Measure], , DESC)
VAR _BottomDealer = RANKX(ALL(Dim_dealers[Dealer/Group Name]), [Measure], , ASC)
VAR _ranking = IF(SELECTEDVALUE(TopBottom[Value] )= "Top", _TopDealer, _BottomDealer)
RETURN
IF(_ranking <= 'Ranking Option'[Ranking Option Value], [Measure])

 

 

The Ranking Option filter at the top is a paramter : 

        Ranking Option Value = SELECTEDVALUE('Ranking Option'[Ranking Option])

The Value filter is a table which I buid as : 

     TopBottom = {"Top", "Bottom"}
 
 
 
 
So, what could be wrong in my dax for not retuning values for bottom selection?
Thanks

 

2 REPLIES 2
Chrisjr
Helper IV
Helper IV

Hi @lbendlin , 

 

Thanks for your answer. 

 

Please see the link below of the app and the dummy dataset :

https://drive.google.com/drive/folders/15gTkdnqpMhB_Ih3E1d4ECIHVDm5OSjL6?usp=drive_link

 

So, on the visual, when I select a top or bottom, it works well. 

However, the issue comes when I filter a LMA. for example below, hen I filter the LMA 10, then it does give me the top 3 but not the bottom 3. THe bottom selection is empty.

 

Chrisjr_0-1701435421820.pngChrisjr_1-1701435440222.png

 

I cannot figure out it will not show me the bottom when I select a filter that has a higher hierarchy than deler. 

( A LMA owns several Dealers).

 

 

Thanks

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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