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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
mhr08004
Frequent Visitor

Nested Measure Selection in Field Parameter

I would like to be able to switch between cacluated measure in a matrix visual based on 2 selections. 

 

The first selects the overall catagory of measure - Labor, Material, ... 

The second selects the type of measure - % of Cost, Total Cost, etc... 

 

I have nicely created a Field Parameter to select 1 Measure based on the selection (below) .. Works perfect... 

 

Cost Category Selection = {

    ("Labor", NAMEOF('Table'[% of Labor]), 0),

    ("Material", NAMEOF(Table[% of Material]), 1),

            …

            …

            …

}

 

Where the measure are defined:

 

% of Labor = DIVIDE(Table[Labor Cost],Table[Total Cost])

% of Material = DIVIDE(Table[Material Cost],Table[Total Cost])

 

Labor Cost, Material Cost and Total Cost are all unique columns.

 

 

 

I want to be able to switch the measure used based on the selection in another parameter or table.

 

Cost Category Selection = {

    ("Labor",

SWITCH(, TRUE(),

SLECTEDVALUE(Measure_Select(Measure) = “% of Cost”),NAMEOF('Table'[% of Labor]),

SLECTEDVALUE(Measure_Select(Measure) = “Total Cost”),NAMEOF('Table'[Sum of Labor]),

 

    … and so on

 

I have creased a second table for selection that is a list of analysis types for this, "Measure Select" with a list of the unique measre, either % or Total for referencing in the Parameter above.

 

Though appreciated.

1 REPLY 1
lbendlin
Super User
Super User

Is this something your users have asked for?

 

Have you considered using a hierarchy slicer?

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.