Forum Discussion
AlexXandyr
2 years agoHelper I
Dynamic matrix with categories/subcategories
Hello, Im trying to create a Matrix that shows two layers, category1 and subcategory2. Where I only want to see Category1 if subcategory2 have more entries than 1 for the specific year chosen in a f...
Anonymous
2 years agoNot applicable
Hi AlexXandyr
You can refer to the following solution.
Sample data
Sample slicer data
The relaionship
Create a measure
Measure =
VAR a =
COUNTROWS (
FILTER ( ALLSELECTED ( 'Table' ), [Category] IN VALUES ( 'Table'[Category] ) )
)
RETURN
IF (
ISFILTERED ( Slicer[Year] ),
CALCULATE ( SUM ( 'Table'[Amount] ), FILTER ( 'Table', a > 1 ) ),
CALCULATE ( SUM ( 'Table'[Amount] ) )
)
Then put the field to the matrix visual
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.