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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Color consistency

Hi,

I have a chart wherein I have made the data in it remain consistent irrespective of the selection made on year,month and quarter.

I have also specified the background colors that has to displayed for different risk levels and it seems to work fine.But,the issue is that when there is no data pertaining to a year (in my eg 2010 and 2012)the data remains consitent but the color of the graph changes.I have attached the application that I have been working on.Please provide the solution for this issue by making the colrs remain consistent irrespective of the selections being made

7 Replies
MayilVahanan

Hi

Try like this

if(Only({1}Risk_Level)='1-Very High',RGB(255, 0, 0),

if(Only({1}Risk_Level)='2-High' ,RGB(171, 233, 198),

if(Only({1}Risk_Level)='3-Medium', RGB(255, 217, 47),

if(Only({1}Risk_Level)='5-Very Low',  RGB(130, 200, 200),

RGB(80, 160, 240)))))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Anonymous
Not applicable
Author

Hi,

above one also correct other wise

Anonymous
Not applicable
Author

Hi anushree,

above one also correct other wise you can chenge the color in object colors tab also it will work.........

Please find the attachemnt of your application.

Regards

Not applicable
Author

Thanks Mayil the solution given,is exactly what I needed.Can you Please let me know the functionality of only() as to when and where they would be used

MayilVahanan

HI

From Help"

If expression or field iterated over the chart dimension(s) contain one single value, that value is returned, else NULL is returned.


Only can return numeric values as well as text values.

You can use only() function that occur only one time.

Only(Risk Level]) is similar to [Risk Level]. We can use set analysis in only() function

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi Khadar,

I am not seeing  any attachment here

Anonymous
Not applicable
Author

Hi Anushree,

                please find the attachment of application.

Regards