Forum Discussion
Cado_one
3 years agoResolver III
Summarize a summarized table
Hi everyone, Context : I need to display values with different aggregations in a matrix on 4 levels. - Level 1 : raw values from a source table - Level 2 : sum of the level 1 values by month fo...
- Anonymous3 years ago
Hi Cado_one,
You can try to use the following measure formulas if helps:
Formula = VAR t1 = SUMMARIZE ( Source, [LOCATIONS], [MONTH], "SumMonths", SUM ( Source[Values] ) ) VAR t2 = SUMMARIZE ( Source, [LOCATIONS], "AverageLocations", AVERAGEX ( FILTER ( t1, [LOCATIONS] = EARLIER ( Source[LOCATIONS] ) ), [SumMonths] ) ) RETURN IF ( ISINSCOPE ( Dates[Month] ), SUM ( Source[Values] ), IF ( ISINSCOPE ( Source[LOCATIONS] ), AVERAGEX ( t1, [SumMonths] ), AVERAGEX ( t2, [AverageLocations] ) ) )If the above formula also doesn't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Anonymous
3 years agoNot applicable
Hi Cado_one,
You can try to use the following measure formulas if helps:
Formula =
VAR t1 =
SUMMARIZE ( Source, [LOCATIONS], [MONTH], "SumMonths", SUM ( Source[Values] ) )
VAR t2 =
SUMMARIZE (
Source,
[LOCATIONS],
"AverageLocations",
AVERAGEX (
FILTER ( t1, [LOCATIONS] = EARLIER ( Source[LOCATIONS] ) ),
[SumMonths]
)
)
RETURN
IF (
ISINSCOPE ( Dates[Month] ),
SUM ( Source[Values] ),
IF (
ISINSCOPE ( Source[LOCATIONS] ),
AVERAGEX ( t1, [SumMonths] ),
AVERAGEX ( t2, [AverageLocations] )
)
)
If the above formula also doesn't help, please share more detailed information to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
- Cado_one3 years agoResolver III
Hi Anonymous
it's working thanks !
Best regards,
Cado