Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Qliksense_77
Creator
Creator

text colouring in pivot

Hi,

I want to colour text in pivot. If the department is above average for the year the colour should be red. And green if the department is under average for the year. It should be like "2019" below, where the average for year is 1,63 and departments under is red and departsments above is green.

I cant get a text clouring expression to work. Anybody that can help?

Qliksense_77_0-1637006717528.png

 

Labels (1)
1 Solution

Accepted Solutions
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @Qliksense_77, I think you should use the TOTAL modifier in your aggregation, something like:

If(
   Sum(expenses) / Sum(units) >=
      Sum(TOTAL <Year> expenses) / Sum(TOTAL <Year> units),
   Green(),
   Red()
   )

JG

View solution in original post

2 Replies
JuanGerardo
Partner - Specialist
Partner - Specialist

Hi @Qliksense_77, I think you should use the TOTAL modifier in your aggregation, something like:

If(
   Sum(expenses) / Sum(units) >=
      Sum(TOTAL <Year> expenses) / Sum(TOTAL <Year> units),
   Green(),
   Red()
   )

JG

Qliksense_77
Creator
Creator
Author

@JuanGerardo , thanks, thats perfect:)