Forum Discussion
Query to change background colour
Hi, I'm looking for a query that changes the background colour of cells based on the value of cells in a particular column:
In the below i'd like to show the "Jul score" as red or green. green if it = to "count of goals", red if it doesn't.
Similarly,
if you drill down into the matrix, these should also have a background colour based on the results of the "Count of Goals" column.
e.g., fixed asset management = red becasue count of goals = 6 and july score = 2
however inventory = red becasue count of goals = 4 and july score = 4.
Hope that is clear! thanks in advance.
jonbox So, will depend on whether these are columns or measures. Let's say Count of Goals is using the Goals column and Jul score is a measure, then you could create a measure like:
Measure = IF(COUNT([Goals]) = [Jul score],1,2)You could then use Conditional formatting to change the background color. You would choose Jul score in the Visualization field well, right-click, Conditional formatting, Background color. Use the new measure as the "What field should we base this on?" setting.
2 Replies
- mh2587
Super User
IF(Count of Goal = Jul score,"Green","Red")
- Greg_Deckler
Community Champion
jonbox So, will depend on whether these are columns or measures. Let's say Count of Goals is using the Goals column and Jul score is a measure, then you could create a measure like:
Measure = IF(COUNT([Goals]) = [Jul score],1,2)You could then use Conditional formatting to change the background color. You would choose Jul score in the Visualization field well, right-click, Conditional formatting, Background color. Use the new measure as the "What field should we base this on?" setting.