Forum Discussion
Clustered Column Conditional Formatting
- 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
Try
Color Category = SWITCH(true(),
Max(Sheet1[Weekday]) in weekday(Today()) && [value]=[Max weekly value],"Red",
"Blue"
)
Can you share sample data and sample output.
Thank You Amitchandak.
I Have created an example using Northwind data;
- Anonymous6 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
- NGC486 years ago
Helper 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
- NGC486 years ago
Helper I
Hi Xiaoxin Sheng, how wuld this work if I applied a date hierarchy; for example week number down to weekday?
if I ahve a day that matches the min I see that may work but not the max? for example the max for all Fridays could be 265, not single Friday will have the same value.
Regards, Noel