Forum Discussion
Group by text measures
- 8 years ago
Hi Unmake,
It is not available to achieve your expected result exactly. We cannot summarize table based on a single measure, because different from a column, measure only returns a signle value without context. To make measure display a list of values, we should add a conext column in table visual.
Suppose table structure is like:
Please create measures similar to:
sales total = SUM(Sales[Sales]) remnants total = SUM(remnants[Remnants]) Type = if([sales total]-[remnants total]>0,"type1","type2") Count articles = IF ( [Type] = "type1", CALCULATE ( COUNT ( articles[ArticleID] ), FILTER ( ALL ( articles ), [Type] = "type1" ) ), CALCULATE ( COUNT ( articles[ArticleID] ), FILTER ( ALL ( articles ), [Type] = "type2" ) ) )Result.
Best regards,
Yuliana Gu
i cant move measure as row :( its main problem
Hi Unmake,
It is not available to achieve your expected result exactly. We cannot summarize table based on a single measure, because different from a column, measure only returns a signle value without context. To make measure display a list of values, we should add a conext column in table visual.
Suppose table structure is like:
Please create measures similar to:
sales total = SUM(Sales[Sales])
remnants total = SUM(remnants[Remnants])
Type = if([sales total]-[remnants total]>0,"type1","type2")
Count articles =
IF (
[Type] = "type1",
CALCULATE (
COUNT ( articles[ArticleID] ),
FILTER ( ALL ( articles ), [Type] = "type1" )
),
CALCULATE (
COUNT ( articles[ArticleID] ),
FILTER ( ALL ( articles ), [Type] = "type2" )
)
)
Result.
Best regards,
Yuliana Gu