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: 
sunitha_chellaiah
Partner - Creator
Partner - Creator

Color same values of different rows

Hi,

My requirement is to highlight same values present in different columns.

For Eg:

if you see below screenshot, battery  capacity values 64 to  64 is same in both the rows then both the rows of battery capacity column should be highlighted with same color.

Note: Battery Capacity kWh is a measure and I have used expression :

min(Battery Capacity kWh)  &' to '&  max(Battery Capacity kWh) 

sunitha_chellai_0-1593001759524.png

Please help me with background color expression.

Thanks in advance.

 

1 Solution

Accepted Solutions
Taoufiq_Zarra

@sunitha_chellaiah  there are several ways 

One:

Map1:
mapping 
LOAD * INLINE [
    Ccode, RGB
    1, "RGB(255,191,0)"
    2, "RGB(153,102,204)"
    3, "RGB(251,206,177)"
    4, "RGB(127,255,212)"
    5, "RGB(0,127,255)"
    6, "RGB(137,207,240)"
    7, "RGB(245,245,220)"
    8, "RGB(0,0,0)"
    9, "RGB(0,0,255)"
    10, "RGB(0,149,182)"
    11, "RGB(138,43,226)"
    12, "RGB(222,93,131)"
    13, "RGB(205,127,50)"
    14, "RGB(150,75,0)"
    15, "RGB(128,0,32)"
    16, "RGB(112,41,99)"
    17, "RGB(150,0,24)"
    18, "RGB(222,49,99)"
    19, "RGB(0,123,167)"
    20, "RGB(247,231,206)"
    21, "RGB(127,255,0)"
    22, "RGB(123,63,0)"
    23, "RGB(0,71,171)"
    24, "RGB(111,78,55)"
    25, "RGB(184,115,51)"
    26, "RGB(255,127,80*)"
    27, "RGB(220,20,60)"
    28, "RGB(0,255,255)"
    29, "RGB(237,201,175)"
    30, "RGB(125,249,255)"
    31, "RGB(80,200,120)"
    32, "RGB(0,255,63)"
    33, "RGB(255,215,0)"
    34, "RGB(128,128,128)"
    35, "RGB(0,255,0)"
    36, "RGB(63,255,0)"
    37, "RGB(75,0,130)"
    38, "RGB(255,255,240)"
    39, "RGB(0,168,107)"
    40, "RGB(41,171,135)"
    41, "RGB(181,126,220)"
    42, "RGB(255,247,0)"
    43, "RGB(200,162,200)"
    44, "RGB(191,255,0)"
    45, "RGB(255,0,255)"
    46, "RGB(255,0,175)"
    47, "RGB(128,0,0)"
    48, "RGB(224,176,255)"
    49, "RGB(0,0,128)"
    50, "RGB(204,119,34)"
    51, "RGB(128,128,0)"
    52, "RGB(255,102,0)"
    53, "RGB(255,69,0)"
    54, "RGB(218,112,214)"
    55, "RGB(255,229,180)"
    56, "RGB(209,226,49)"
    57, "RGB(204,204,255)"
    58, "RGB(28,57,187)"
    59, "RGB(253,108,158)"
    60, "RGB(142,69,133)"
    61, "RGB(0,49,83)"
    62, "RGB(204,136,153)"
    63, "RGB(128,0,128)"
    64, "RGB(227,11,92)"
    65, "RGB(255,0,0)"
    66, "RGB(199,21,133)"
    67, "RGB(255,0,127)"
    68, "RGB(224,17,95)"
    69, "RGB(250,128,114)"
    70, "RGB(146,0,10)"
    71, "RGB(15,82,186)"
    72, "RGB(255,36,0)"
    73, "RGB(192,192,192)"
    74, "RGB(112,128,144)"
    75, "RGB(167,252,0)"
    76, "RGB(0,255,127)"
    77, "RGB(210,180,140)"
    78, "RGB(72,60,50)"
    79, "RGB(0,128,128)"
    80, "RGB(64,224,208)"
    81, "RGB(63,0,255)"
    82, "RGB(127,0,255)"
    83, "RGB(64,130,109)"
    84, "RGB(255,255,255)"
    85, "RGB(255,255,0)"
];

Data:
load * Inline [
Active Years, Battery capacity KWh, Motor Power KW, System Torque Nm
2019 to 2023, 64 to 64, 150 to 150, 310 to 310
2021 to 2025, 64 to 64, 150 to 150, 310 to 310
2017 to 2023, 39.2 to 64, 99 to 150, 395 to 310
2019 to 2024, 45.2 to 56.5, 81 to 135, 285 to 285
];
left Join

load ApplyMap('Map1', RowNo()) As Flag,count([Battery capacity KWh]) as Tmp,[Battery capacity KWh] resident Data group by [Battery capacity KWh];

drop fields Tmp;

 

output :

Capture.PNG

Back color :

If(Column(1) <> 0,
Flag
)

attached qliksense file

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

1 Reply
Taoufiq_Zarra

@sunitha_chellaiah  there are several ways 

One:

Map1:
mapping 
LOAD * INLINE [
    Ccode, RGB
    1, "RGB(255,191,0)"
    2, "RGB(153,102,204)"
    3, "RGB(251,206,177)"
    4, "RGB(127,255,212)"
    5, "RGB(0,127,255)"
    6, "RGB(137,207,240)"
    7, "RGB(245,245,220)"
    8, "RGB(0,0,0)"
    9, "RGB(0,0,255)"
    10, "RGB(0,149,182)"
    11, "RGB(138,43,226)"
    12, "RGB(222,93,131)"
    13, "RGB(205,127,50)"
    14, "RGB(150,75,0)"
    15, "RGB(128,0,32)"
    16, "RGB(112,41,99)"
    17, "RGB(150,0,24)"
    18, "RGB(222,49,99)"
    19, "RGB(0,123,167)"
    20, "RGB(247,231,206)"
    21, "RGB(127,255,0)"
    22, "RGB(123,63,0)"
    23, "RGB(0,71,171)"
    24, "RGB(111,78,55)"
    25, "RGB(184,115,51)"
    26, "RGB(255,127,80*)"
    27, "RGB(220,20,60)"
    28, "RGB(0,255,255)"
    29, "RGB(237,201,175)"
    30, "RGB(125,249,255)"
    31, "RGB(80,200,120)"
    32, "RGB(0,255,63)"
    33, "RGB(255,215,0)"
    34, "RGB(128,128,128)"
    35, "RGB(0,255,0)"
    36, "RGB(63,255,0)"
    37, "RGB(75,0,130)"
    38, "RGB(255,255,240)"
    39, "RGB(0,168,107)"
    40, "RGB(41,171,135)"
    41, "RGB(181,126,220)"
    42, "RGB(255,247,0)"
    43, "RGB(200,162,200)"
    44, "RGB(191,255,0)"
    45, "RGB(255,0,255)"
    46, "RGB(255,0,175)"
    47, "RGB(128,0,0)"
    48, "RGB(224,176,255)"
    49, "RGB(0,0,128)"
    50, "RGB(204,119,34)"
    51, "RGB(128,128,0)"
    52, "RGB(255,102,0)"
    53, "RGB(255,69,0)"
    54, "RGB(218,112,214)"
    55, "RGB(255,229,180)"
    56, "RGB(209,226,49)"
    57, "RGB(204,204,255)"
    58, "RGB(28,57,187)"
    59, "RGB(253,108,158)"
    60, "RGB(142,69,133)"
    61, "RGB(0,49,83)"
    62, "RGB(204,136,153)"
    63, "RGB(128,0,128)"
    64, "RGB(227,11,92)"
    65, "RGB(255,0,0)"
    66, "RGB(199,21,133)"
    67, "RGB(255,0,127)"
    68, "RGB(224,17,95)"
    69, "RGB(250,128,114)"
    70, "RGB(146,0,10)"
    71, "RGB(15,82,186)"
    72, "RGB(255,36,0)"
    73, "RGB(192,192,192)"
    74, "RGB(112,128,144)"
    75, "RGB(167,252,0)"
    76, "RGB(0,255,127)"
    77, "RGB(210,180,140)"
    78, "RGB(72,60,50)"
    79, "RGB(0,128,128)"
    80, "RGB(64,224,208)"
    81, "RGB(63,0,255)"
    82, "RGB(127,0,255)"
    83, "RGB(64,130,109)"
    84, "RGB(255,255,255)"
    85, "RGB(255,255,0)"
];

Data:
load * Inline [
Active Years, Battery capacity KWh, Motor Power KW, System Torque Nm
2019 to 2023, 64 to 64, 150 to 150, 310 to 310
2021 to 2025, 64 to 64, 150 to 150, 310 to 310
2017 to 2023, 39.2 to 64, 99 to 150, 395 to 310
2019 to 2024, 45.2 to 56.5, 81 to 135, 285 to 285
];
left Join

load ApplyMap('Map1', RowNo()) As Flag,count([Battery capacity KWh]) as Tmp,[Battery capacity KWh] resident Data group by [Battery capacity KWh];

drop fields Tmp;

 

output :

Capture.PNG

Back color :

If(Column(1) <> 0,
Flag
)

attached qliksense file

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉