Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
WEBINAR June 25, 2025: Build on Apache Iceberg with Qlik Open Lakehouse - REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
qvqs11
Contributor
Contributor

Create a custom text color expression by comparing Group 1 values with another Group 2 in Pivot table

Hi Experts,

I am having the following scenario to compare two group values (Measure 1 & Measure 2) and need to provide custom text color for second group measure value.

Please find the sample input:

qvqs11_0-1748260411887.png

Scenario : We need to check condition for Measure 2 only , but need to follow the below steps

--> Measure 1 Condition : Always Measure value >0.5 and <0.75

--> Measure 2 condition check : If satisfies Measure 1 condition then also check Measure 2 Value >=0.75 then display Red text color for only Measure 2 group values

 

Sample Output : 

qvqs11_1-1748260566469.png

Thanks Team !!

Labels (4)
1 Reply
alexquimu
Partner - Contributor III
Partner - Contributor III

Hey @qvqs11 ,

 

I got the data you were working with from the screenshot.

 

In the app, I created a pivot table with Cardinal as the dimension; Measure 1 and Measure 2 as the measures. I also moved Values to the first measure to achieve your result:

alexquimu_7-1749327681524.png

For every cardinal, the function Column(1) returns the value of the first measure and Column(2) the second measure. To show the functionality of the Column() function, take a look at the following picture. Column(1) and Column(2) are basically a copy of the Measure 1 and Measure 2 columns:

alexquimu_8-1749327714529.png

That way, you can use the Column() function to color the measure 2 according to your logic as follows:

if(Column(1) > 0.5 and Column(1) < 0.75 and Column(2) >= 0.75, red())

 

Greetings,

Alex