Forum Discussion
Hide Measure column in Matrix that contains no value
- 1 year ago
You forgot to either expand or go into the next level in the hierarchy. If there isn't a single field of the display column parameter, SELECTEDVALUE returns blank so none in the switch conditions is met.
Field parameters work like pseudo-dimensions that let you switch between measures, but even when a measure has blank values, it will still appear as a separate column. Since your sample PBIX already includes a field parameter, use its field name column as the column header instead of treating it like a measure selector - just ensure to choose Show selected field rather than its values.
Then create this measure:
Display_Column_Value =
SWITCH (
SELECTEDVALUE ( Display_column[Display_column Order] ),
0, [forecast qty],
1, [Shipped qty],
2, [variant],
3, [schedule ship],
4, [Backlog qty]
)
Please see the attached pbix.
- mbudiman1 year ago
Helper III
hi Danextian,
The solution works 🙂
So I try to recreate new table matrix according to your advise :
1. Use the Field parameter as column header and set "Show Selected field"
2. I use the measure you had already created.
However, no value is display in the matrix. Do I miss any step ? Could you help me one more time to point out missing step. I've upload the pbix. The new matrix I created is in the "Test" tab. Thank you in advance for your help.