Forum Discussion
Matrix Column Name Based on Slicer Selection
- Anonymous5 years ago
Hi rlmeyer
I think you want to build a dynamic column header in Matrix visual. However we can't add a measure in column, you may transform your data model as below and build a measure to achieve your goal.
Due to I don't know your data model, I build a sample.
Fact Table:
Then build a Hidden Table and Append two tables as a new one in Power Query Editor.
New Table:
Build a Slicer table and build a Measure.Measure = VAR _select = SELECTEDVALUE ( Slicer[Name] ) RETURN IF ( _select = "Estimate Name", CALCULATE ( MAX ( Append1[Value] ), FILTER ( Append1, Append1[Column] <> "Hidden Name" ) ), CALCULATE ( MAX ( Append1[Value] ), FILTER ( Append1, Append1[Column] <> "Estimate Name" ) ) )Result is as below.Default:Select Estimate Name:You can download the pbix file from this link: Matrix Column Name Based on Slicer SelectionBest Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi rlmeyer
I think you want to build a dynamic column header in Matrix visual. However we can't add a measure in column, you may transform your data model as below and build a measure to achieve your goal.
Due to I don't know your data model, I build a sample.
Fact Table:
Then build a Hidden Table and Append two tables as a new one in Power Query Editor.
New Table:
Measure =
VAR _select =
SELECTEDVALUE ( Slicer[Name] )
RETURN
IF (
_select = "Estimate Name",
CALCULATE (
MAX ( Append1[Value] ),
FILTER ( Append1, Append1[Column] <> "Hidden Name" )
),
CALCULATE (
MAX ( Append1[Value] ),
FILTER ( Append1, Append1[Column] <> "Estimate Name" )
)
)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.