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

changing values with colours using IF statement error

Dear experts,

I am currently using an IF loop to change a certain value to green/red when a condition is met the expression I am currently using is:

if($(v%rev), green(), red())

the logic seems correct to me however I am getting weird values in the straight table seen in the attached picture.

I have also attached a qvw file for your reference.

Kind regards,

Royce Tang

1 Solution

Accepted Solutions
dsharmaqv
Creator III
Creator III

HI

You are using color at incorrect place

just expand the expression where you want to display the color by cliking + symbol and enter your expression in background color

if( $(v%rev) > 0, Green(), red())

This will resolve your issue

View solution in original post

3 Replies
dsharmaqv
Creator III
Creator III

HI

You are using color at incorrect place

just expand the expression where you want to display the color by cliking + symbol and enter your expression in background color

if( $(v%rev) > 0, Green(), red())

This will resolve your issue

avinashelite

Where you need this red() and green() colors ? in the gauge ? if that the case then in the expression tab go to gauge setting > Define the segments and its values according to your need that should work..

rahulpawarb
Specialist III
Specialist III

Hello Royce,

I agree with Deepak! Changing the Background color of % rev. growth expression will fetch the desired results (refer attached application).

Regards!

Rahul