Forum Discussion
NGC48
6 years agoHelper I
Clustered Column Conditional Formatting
Hi all, I have what I feel should be a simle solution but cant work it out. I have a column chart to display number of orders per weekday; I have calculated the Max & Min of the weekdays. My probl...
- Anonymous6 years ago
Hi NGC48,
You can add a calculated column to your fact table to stored weekday and write a measure formula to use on condition color formation.
Calculate column
WeekdayName = FORMAT([Date],"ddd")Measure:
color formatting = VAR varTable = SUMMARIZE ( ALLSELECTED ( 'fact' ), [WeekdayName], "Count", COUNTROWS ( 'fact' ) ) VAR _min = MINX ( varTable, [Count] ) VAR _max = MAXX ( varTable, [Count] ) VAR _curr = CALCULATE ( COUNTROWS ( 'fact' ), VALUES ( 'fact'[WeekdayName] ) ) RETURN IF ( _curr = _min, "Red", IF ( _curr = _max, "Green", "Blue" ) )Regards,
Xiaoxin Sheng
Anonymous
6 years agoNot applicable
Hi NGC48,
You can add a calculated column to your fact table to stored weekday and write a measure formula to use on condition color formation.
Calculate column
WeekdayName = FORMAT([Date],"ddd")
Measure:
color formatting =
VAR varTable =
SUMMARIZE (
ALLSELECTED ( 'fact' ),
[WeekdayName],
"Count", COUNTROWS ( 'fact' )
)
VAR _min =
MINX ( varTable, [Count] )
VAR _max =
MAXX ( varTable, [Count] )
VAR _curr =
CALCULATE ( COUNTROWS ( 'fact' ), VALUES ( 'fact'[WeekdayName] ) )
RETURN
IF ( _curr = _min, "Red", IF ( _curr = _max, "Green", "Blue" ) )
Regards,
Xiaoxin Sheng
NGC48
6 years agoHelper I
Thank You Xiaoxin Sheng 😊 is this the only way you would consider achiveing this? could the formtting be seperated from the calculation and still work as a sperate measure?
Regards, Noel