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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
Mitch_Conner
Frequent Visitor

Field parameter set - if/then

Hi! I need help with a field parameter where I want a list of parameter options based on a filter selection. Here's some sloppy fictional data that simplifies my issue the best I can figure. 

 

We want to analyze class attendance statistics by different factors, like a student’s primary elective or what class they took. However, not everyone takes the same classes. Sytherins are the only ones who are schooled in being creepy, Gryffindors take sports history, but everyone takes Defense Against the Dark Arts.

I’m providing filter options and the column chart is using a parameter field for the legend. If you do not filter down to specific classes and use class as your legend, you’ll see all the data in the table, right?

Mitch_Conner_0-1696969931454.png

 

 

But if I try to Hufflepuff attendance for a class in Creepin’, I get blanks, and correctly so, because Hufflepuffs ain’t creeps.

Mitch_Conner_1-1696969931457.png

 

 

This year I have a new professor who has no clue that Hufflepuffs don’t creep and Ravenclaws don’t study sports history. They see this chart and immediately think the data is broken and they won’t use this report because it’s wrong.

So Dumbledore insists that this parameter be filtered, so you cannot select Creepin’ if you’ve selected Hufflepuff.

Using two filters that interact isn't an option because the purpose is to dynamically change the legend. 

 

But this report requires:

  1. The legend MUST be dynamic
  2. The chart can’t just be blank
  3. Not accomplishing this with bookmarks because
    1. That’s what I’m currently using and it’s not flexible enough
    2. The user might eventually want to see a top 5ish students

 

What I need is a Nested IF Parameter that says,

If selectedvalue(house)=”Slytherin”, {S list of options},

If selectedvalue(house)=”Hufflepuff”, {H list of options}

If selectedvalue(house)=”Gryffindor”, {G list of options}

If selectedvalue(house)=”Ravenclaw”, {R list of options}

 

Thanks!

 

1 ACCEPTED SOLUTION
Mitch_Conner
Frequent Visitor

I lucked into exactly what I needed after trying a few different switch measures.

View solution in original post

3 REPLIES 3
Mitch_Conner
Frequent Visitor

I lucked into exactly what I needed after trying a few different switch measures.

amitchandak
Super User
Super User

@Mitch_Conner , for the first two slicers you can use a measure from a common fact/table to reduce the values.

 

https://www.youtube.com/watch?v=cyOquvfhzNM

 

If you like to change measure based on field parameter

 

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for your suggestions. This isn't quite what I'm looking for because the user may not choose anything in the filters at all. This is a snippet of my actual (abridged) data. 

Mitch_Conner_0-1697035845309.png

 

I need my Parameter fields to be limited based on one filter selection so I can get rid of my overcomplicated bookmarks. 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors