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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
amotto11
Helper II
Helper II

Using Filters inside page level filters

This is difficult to explain, but i am trying to make a visual level filter inside of a page level filter, and a ranking function that will only look at the page level filter.

 

If i have 100 companies that sell clothes, and i am only interested in 50 of them. I have a page level filter that only views that 50 i want to compare against each other. Then i have a visual that just says "Shirts" for instance. I want a visual level filter where I can select only one company inside of the 50 companies and the table will show my the companies rank in their price for the shirt among all 50 companies. Right now, when i select a company in my visual level filter it always shows ranked 1, because it is removing the other 49 companies from the page level filter in the analysis.

 

Can anyone explain the logic behind nested filters in this way, how could i have a rank function that ignores the visual level filter, but looks at the page level filters?

2 REPLIES 2
v-sihou-msft
Employee
Employee

@amotto11

 

Since you want to create a RANK on based on the filtered table context, I think you create RANK measure to get the correct rank number. However, when you select only one company in the visual the filter context becomes the one company only so that it always returns 1. It's not possible to make the RANK "dynamically" based on Page Level Filter, but "fixed" for Visual Level Filter. You have to select all companies in visual to show correct RANK.

 

3.PNG

 

RANK = RANKX(ALLSELECTED(Table6),CALCULATE(SUM(Table6[Sales])),,DESC,Dense)

4.PNG

 

 

Regards,

Simon,

 

Thank you very much for your reply. I am glad that you understood my question, but it is unfortunate that there is not a way do what i am wanting to do.

 

Do you know of a way that i could get around this?

 

The only thing that i can think of, you can tell me if this will work, is if i have a field called company group in my table where i group the companies into 3 different groups or so. Would i then be able to have 3 seperate ranking measures that "filter" on the group number, but ignore any outside filters. Then i would be able to use visual level filters to filter none of the companies, when looking at the group/industry, and filter on only one company in another visual when i want to drill down into its characteristics. The problem is that I am new to Dax, so creating this formula might be beyond me and you can probably get back to me faster than i can create it. In summary, i would be basically placing the page level filter into the table with a column, then i could use 3 or however many groups i have or combination of groups that i want, pages each with a different rank measure. Then just use visual level filters and slicers to control an individual company. Do you think this could work, or do you have a better, maybe more efficient work around?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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