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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lucky1
Creator
Creator

Sorting color by mastermeasure

Hi Team,

I have created master measure as color

If(country='uk',RGB(169,169,240),

If(country='us',RGB(189,244,250))) as colour

Now I want to sort this by color I want RGB(180,244250) first and RGB(169,169,240) color second

I tried with if(color='RGB(189,244,250)',1,

If(color='RGB(169,169,240)',2))

But it is not working

 

 

 

 

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
Lucky1
Creator
Creator
Author

I found solution for this created master measure to define the colors 

If(country='uk',RGB(169,169,240),

If(country='us',RGB(189,244,250))) as colour

In background color in expression used color

In sorting expression used

If(country='uk',1,

If(country='us',2)) and sort by numerically select

 

View solution in original post

3 Replies
Vinicius_121
Contributor II
Contributor II

Hello,

Try using dual to set a numerical value for each RGB function, like this:

If(country='uk',dual(RGB(169,169,240),2),

If(country='us',dual(RGB(189,244,250),1))) as colour

then you can classify automatic

Lucky1
Creator
Creator
Author

Hi vinicius123 thanks for your reply.I tried but didn't worked for me

Lucky1
Creator
Creator
Author

I found solution for this created master measure to define the colors 

If(country='uk',RGB(169,169,240),

If(country='us',RGB(189,244,250))) as colour

In background color in expression used color

In sorting expression used

If(country='uk',1,

If(country='us',2)) and sort by numerically select