Forum Discussion

mhr08004's avatar
mhr08004
Frequent Visitor
2 years ago

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

  • Is this something your users have asked for?

     

    Have you considered using a hierarchy slicer?