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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Conditional page level filters

Hi all,

 

I have an issue where I think dynamic page level fileters could help, but I can't get it working.

 

In my report, I have some slicers in which users can select region and school division and see the data at their level. Until recently, they had to select one region and below that one, more or all divisions. This selection works through in all following report pages (30 +). No problems here. Recently there was a request if this could be modified to also show national data. I have facilitated this by adding the option in the slicer to also select all regions. If you select all regions of the Philippines, you select the whole nation. So far, so good.

 

I just now realized that there is a small issue here. The data we present at a national level are at some pages different from the data we present at regional and lower level The difference is based on the following:

For every school in the country we know if they participate in the survey or not. For data at the national level, we display the participation rate once and after that only work with the participating schools. For the regional and lower level, we also show the non participating schools.

In order to get this into PowerBI, I was thinking on adding a conditional powerBI page filter on those pages where the calculation is different. I have  variable and a measure that indicate if we are working with national or regional data. I was looking at some kind of a page level filter like this:

If National data” then “exclude non partipating schools”  else “use all data” but this seems  not to be possible at the page level filters. Do you have a suggestion?

 

5 REPLIES 5
edhans
Super User
Super User

Whenever I have some conditions for filtering that go beyond what the filtering allows, I create a new Custom Column in Power Query with all of the logic I want that generally evaluetes to TRUE/FALSE, but could be anything. Then I bring that field into the DAX model, drop that column in the filter, and just filter on TRUE or FALSE. 

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Hi Edhans (and others ...),

 

Been giving it a try, but I have a column which I can use to filter data I need and I can put that in the page level filter. However, I can't get an if then else statement working here ..

 

What I would need is : if (Measure National = "National") then filter (calculated column Participation_yes" = True

 

Any thoughts on this? Thanks in advance

 

Ubo

 

I'd need to see your file or more explanation. You cannot use measures as filters, and referring to measures in calculated columns especially with IF logic can cause issues. I do all of my logic in Power Query to avoid these issues. Those are treated as native source data and can be used as filters and slicers with no performance issues or potential for hitting circular logic problems.

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Hi @Anonymous,

Unfortunately, you can't create a dynamic calculated column/table based on filter/slicer. (measure result are calculated based on its row contents, these row contents will be fix as the whole table when you use on calculated column)

Notice: Slicer and measure not really affect data model table records, its data source is a virtual table that generates/copy from data model tables. You can't use child level to effect its parent level data tables.

Regards,

Xiaoxin Sheng

 

Anonymous
Not applicable

Hi Edhans,

 

Nice solution and I did not think of that. Will give it a try and get back to you on that

 

Ubo

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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