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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to create a nested filter/slicer?

Hi all,

 

I have like 50 scenarios, each of which has multiple parameters, and I want to create a measure, that I first select a scenario as base case, and choose which value I want to compare, and generate a visual. I have created 3 tables, Base case table for a base case slicer, value table contains the values of each parameter of each case, parameter table for a parameter slicer.

The tables I have have a structure like below:

Base case table

Case 1
Case 2
Case 3
Case 4

 

Value table, For each case, it has a table of all kinds of parameters with values

parameter 1parameter 2parameter 3
357
468

 

Parameter table

parameter 1
parameter 2
parameter 3
parameter 4

 

I have manually did a meausure for a specific parameter like this:

Total Tonnes % difference from Base Case =
VAR Base_Case = SELECTEDVALUE('Scenario Definition'[Base_Scenario])
VAR __BASELINE_VALUE =
    CALCULATE(
        SUM('Input Files'[Total Tonnes]),
        'Input Files'[Scenario_Name] IN { Base_Case }
    )
   
VAR __MEASURE_VALUE = SUM('Input Files'[Total Tonnes])
RETURN
    IF(
        NOT ISBLANK(__MEASURE_VALUE),
        DIVIDE(__MEASURE_VALUE - __BASELINE_VALUE, __BASELINE_VALUE)
    )

 

 

Above code works for a specific parameter "Total Tonnes", but I want to have something that can dynamically change as I choose different parameters.

I tried this, basically I want the SUM function SUM('Input Files'[parameter]), call the parameter slicer, but it does not work.

Total parameter % difference from Base Case =
VAR Base_Case = SELECTEDVALUE('Scenario Definition'[Base_Scenario])
VAR Selected_parameter = SELECTEDVALUE('Parameters'[Name])
parameter == VAR Selected_parameter
VAR __BASELINE_VALUE =
    CALCULATE(
        SUM('Input Files'[parameter]),
        'Input Files'[Scenario_Name] IN { Base_Case }
    )
   
VAR __MEASURE_VALUE = SUM('Input Files'[parameter])
RETURN
    IF(
        NOT ISBLANK(__MEASURE_VALUE),
        DIVIDE(__MEASURE_VALUE - __BASELINE_VALUE, __BASELINE_VALUE)
    )

 

Would you please help out?

 

Thank you.

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors