Forum Discussion
Filter matrix based on values columns
- Anonymous4 years ago
Posting my own solution for visibility. I ended up creating a single measure that returns 1 if the slicer selection conditions are met and 0 if they are not. That measure gets applied as a visual level filter to the matrix, which is set to only show items when that value is 1.
#RecordMeetsConditions = VAR NumOfSelectedAttrVal = DISTINCTCOUNT ( 'my table'[attr_value] ) VAR SelectedNumCols = CALCULATE( DISTINCTCOUNT ( 'my table'[attr_name] ) , ALLSELECTED(my table) ) VAR bool = IF(NumOfSelectedAttrVal = SelectedNumCols, 1, 0) RETURN bool
Hi Anonymous ,
Please refer to my pbix file to see if it helps you.
Create two table based on the table.
Table 2 = SUMMARIZE('Table','Table'[attribute_name])Table 3 = SUMMARIZE('Table','Table'[-attribute_value])
Then create two measures.
Measure = CALCULATE(SUM('Table'[-attribute_value]),FILTER(('Table'),'Table'[attribute_name]in VALUES('Table 2'[attribute_name])))Measure——2= CALCULATE(MAX('Table'[-attribute_value]),FILTER(('Table'),'Table'[-attribute_value]in VALUES('Table 3'[-attribute_value])))
If I have misunderstood your meaning, please provide more details with your desired output and your pbix file without privacy information.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
For my use case, I need the attribute names and attribute values to be in the same slicer with parent-child relationships. You can take a look at the solution I posted for what ended up working for me.