Forum Discussion
Anonymous
6 years agoNot applicable
Dividing a Measure into Multiple Categorizations
Hi all, I'm struggling with this graph I'm trying to create, and I could really use some help. This is what my data looks like (just the upper three tables: Products, Entries and Durations). ...
- 6 years ago
Anonymous thanks for the clarification 🙂
I would do it this way (PBIX link )
- Create a disconnected table called Color which has a column Color, with values "X" and "Y"
- Create this measure to use in the clustered column chart:
Measure for Visual = SUMX ( VALUES ( Products[ID] ), IF ( [have an entry], // True if [have an entry] is nonzero VAR HasC = CALCULATE ( [have a duration], Durations[Category] = "C" ) // True if [have a duration] is nonzero when Category = "C" RETURN SUMX ( Color, SWITCH ( Color[Color], "X", IF ( HasC, 0.4, 1 ), "Y", IF ( HasC, 0.6 ) ) ) ) )- Create a column chart with Color[Color] as the Legend and [Measure for Visual] as the measure. Set the colors for X & Y appropriately.
- Result looks something like this:
Regards
Owen