Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

How to compare numbers between rows in a table for specific dimension

Hello,

I have a requirement where i have to check if the numbers for a group matches or not and based on that assign green/red color to the text in a straight table. Will be more clear from below example

Code      Date                 Amount

1            7/10/2022        500

1            7/17/2022        500

2            7/5/2022           878

2            7/11/2022        880

3            7/20/2022        350

3            7/25/2022        350

 

So, in the above example, Amount on two different dates matches for Code 1 and 3 and hence all 4 rows corresponding to these 2 codes needs to be shown in Green (only Amount column in green is enough) and for Code 2, the Amount doesn't match and hence these two rows will be red. Hope the requirement is clear enough.  I am looking to handle this in the front end table .

Any tip or suggestion will be appreciated, thanks.

Labels (1)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, maybe

if(aggr(nodistinct count(distinct Amount),Code)=1, green(), lightred())

View solution in original post

2 Replies
justISO
Specialist
Specialist

Hi, maybe

if(aggr(nodistinct count(distinct Amount),Code)=1, green(), lightred())

pranaview
Creator III
Creator III
Author

Hello, this expression worked. thanks!