Forum Discussion
Custom summaries when collapsing row dimensions in Matrix
- 5 years ago
Anonymous
I have prepared an example solution. Please check the file.
You can use this measure to check the levels as well as the action assignments:
Selected Date Level = SWITCH ( TRUE (), ISINSCOPE ( 'Table'[Date].[Day] ), MAX ( 'Table'[Weather] ), ISINSCOPE ( 'Table'[Date].[Month] ), VAR __SunnyDays = COUNTROWS ( FILTER ( 'Table', 'Table'[Weather] = "Sunny" ) ) RETURN IF ( ISBLANK ( __SunnyDays ), 0, __SunnyDays ) & "/" & COUNTROWS ( 'Table' ), ISINSCOPE ( 'Table'[Date].[Quarter] ), VAR __SunnyDays = COUNTROWS ( FILTER ( 'Table', 'Table'[Weather] = "Sunny" ) ) RETURN IF ( ISBLANK ( __SunnyDays ), 0, __SunnyDays ) & "/" & COUNTROWS ( 'Table' ), ISINSCOPE ( 'Table'[Date].[Year] ), VAR __SunnyDays = COUNTROWS ( FILTER ( 'Table', 'Table'[Weather] = "Sunny" ) ) RETURN IF ( ISBLANK ( __SunnyDays ), 0, __SunnyDays ) & "/" & COUNTROWS ( 'Table' ), BLANK () )Proud to be a Super User.
If I helped, please accept the solution
and give kudos!
Once creating a new measure, is it possible to modify the summary to use that measure, but keep the individual cells using a different measure? I would suppose that's not possible.
For example:
- Month1
- Week1 (2/7)
- Day1 Sunny
- Day2 Sunny
- Day3 Raining
- Day4 Raining
- Day5 Raining
- Day6 Raining
- Day7 Raining
- Week1 (2/7)
In this example the expanded cells are using the weather measure, but the summary collapsed view might be using a different, summary-type, measure. I assume that's not possible?
Because if not, I would fear this happening:
- Month1
- Week1 (2/7)
- Day1 (1/1)
- Day2 (1/1)
- Day3 (0/1)
- Day4 (0/1)
- Day5 (0/1)
- Day6 (0/1)
- Day7 (0/1)
- Week1 (2/7)
The same question would be posed to richbenmintz solution.
Anonymous
I have prepared an example solution. Please check the file.
You can use this measure to check the levels as well as the action assignments:
Selected Date Level =
SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[Date].[Day] ), MAX ( 'Table'[Weather] ),
ISINSCOPE ( 'Table'[Date].[Month] ),
VAR __SunnyDays =
COUNTROWS ( FILTER ( 'Table', 'Table'[Weather] = "Sunny" ) )
RETURN
IF ( ISBLANK ( __SunnyDays ), 0, __SunnyDays ) & "/"
& COUNTROWS ( 'Table' ),
ISINSCOPE ( 'Table'[Date].[Quarter] ),
VAR __SunnyDays =
COUNTROWS ( FILTER ( 'Table', 'Table'[Weather] = "Sunny" ) )
RETURN
IF ( ISBLANK ( __SunnyDays ), 0, __SunnyDays ) & "/"
& COUNTROWS ( 'Table' ),
ISINSCOPE ( 'Table'[Date].[Year] ),
VAR __SunnyDays =
COUNTROWS ( FILTER ( 'Table', 'Table'[Weather] = "Sunny" ) )
RETURN
IF ( ISBLANK ( __SunnyDays ), 0, __SunnyDays ) & "/"
& COUNTROWS ( 'Table' ),
BLANK ()
)
|
Proud to be a Super User. If I helped, please accept the solution and give kudos! |