Forum Discussion
Filter parameter table on other slicer
- 8 months ago
Hi Theo1403 , Thank you for reaching out to the Microsoft Community Forum.
A field parameter only switches columns when the parameter table is actually part of the visual’s evaluation context. Once you remove the parameter slicer, the parameter table stops being filtered, so Power BI has no way to know which parameter row should be active. That’s why every automatic attempt ends up with a blank table.
To make it work, the parameter table just needs to participate in the visual. The simplest way is to add the parameter’s Order column to the table visual and hide it, so users never see it. With that column present, you can use a small measure to decide whether row 0 or row 1 should be active based on how many Regions are selected and then apply that measure as a visual level filter. The field parameter will switch instantly and you keep its native performance.
If you’d rather not include even a hidden parameter column in the visual, then the parameter can’t be sliced indirectly. In that case the practical alternative is a measure that checks the Region selection count and returns Column1 or Column2 text for each supplier row. It doesn’t use the field parameter, but it avoids the context problem entirely and performs well even on large supplier tables.
Hi Theo1403
Thanks for your response
Can you provide any sample data or any snapshot of input/output ?
Thanks and regards,
Praful
Hi Praful_Potphode ,
My model has the same characteristics as your sample pbix, it is just a lot bigger (dimension table > 6,000 rows). If you place the parameter in the table visual, you get both columns (Column1 and Column2). The table should show Column1 (including Column 1 header) when 1 Region is selected and Column 2 when more than 1 Region is selected. The same behavior you would achieve when you add a slicer on the Parameter Order column (that column is currently hidden). I just do not want to add the parameter slicer to the report, but want to slice the parameter table based on the number of selected regions.
Hope you can help
Regards,
Theo
- v-hashadapu8 months agoCommunity Support
Hi Theo1403 , Thank you for reaching out to the Microsoft Community Forum.
A field parameter only switches columns when the parameter table is actually part of the visual’s evaluation context. Once you remove the parameter slicer, the parameter table stops being filtered, so Power BI has no way to know which parameter row should be active. That’s why every automatic attempt ends up with a blank table.
To make it work, the parameter table just needs to participate in the visual. The simplest way is to add the parameter’s Order column to the table visual and hide it, so users never see it. With that column present, you can use a small measure to decide whether row 0 or row 1 should be active based on how many Regions are selected and then apply that measure as a visual level filter. The field parameter will switch instantly and you keep its native performance.
If you’d rather not include even a hidden parameter column in the visual, then the parameter can’t be sliced indirectly. In that case the practical alternative is a measure that checks the Region selection count and returns Column1 or Column2 text for each supplier row. It doesn’t use the field parameter, but it avoids the context problem entirely and performs well even on large supplier tables.