Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Zaga_69
Creator
Creator

Set analysis

Hi guys,

 

Just a simple question. I am trying to set the text color expression in a pivot table by doing:

IF(NPM_TOTAL_SALES<= 0,'red','green')

 

However, it does not work. The negative number are still in green.

 

Any idea?

 

Many Thanks,

 

Edi

Labels (1)
1 Solution

Accepted Solutions
juliensaintmaxent3113
Partner - Creator III
Partner - Creator III

hi,

try with aggregation, if(sum(NPM_TOTAL_SALES)<= 0,'red','green')

Bye

View solution in original post

7 Replies
anushree1
Specialist II
Specialist II

Use it like : IF(NPM_TOTAL_SALES<= 0,red(),green()) or IF(NPM_TOTAL_SALES<= 0,rgb(255,0,0),rgb(0,255,0))

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

IF(NPM_TOTAL_SALES<= 0,red(),green())

Use the above.

Besides why not trying.

Keep in mind the below option works only with expressions:

Screenshot_1.jpg

juliensaintmaxent3113
Partner - Creator III
Partner - Creator III

hi,

try with aggregation, if(sum(NPM_TOTAL_SALES)<= 0,'red','green')

Bye

Zaga_69
Creator
Creator
Author

Hi

Thanks. However it does not work. 

 

juliensaintmaxent3113
Partner - Creator III
Partner - Creator III

can you send us screenshot of your graphice and expression please?

juliensaintmaxent3113
Partner - Creator III
Partner - Creator III

try to add expression with if(NPM_TOTAL_SALES<= 0,'KO','OK') in the graphic and look if it works fine.

Zaga_69
Creator
Creator
Author

Thanks!

Now it works 🙂