Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I created pie chart using value list dimensions.
Dimensions:-=valuelist('Unlimited Contracts N-1','Fixed Term Contracts N-1','Total Temps N-1')
Right now the colors of the dimensions are coming automatically as i have opted Colors Auto in Qliksense
I want to assign same colors to the dimensions like below:
Unlimited Contract N-1 = Blue
Fixed term Contract N-1= Red
Total Temps N-1= Green
I tried to make assign the colors in measures like below but it did not worked .
=if( valuelist('Unlimited Contracts N-1','Fixed Term Contracts N-1','Total Temps N-1')='Unlimited Contracts N-1',
num(sum({<Indicateur.Code = {'PO.1.131b'},[Site.isYFPO]={'$(vChange)'},[Site.Participe]={'49|50'},Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date.MonthEnd =, MonthYear=,Date=,NewTestvb1=,Addmonths_Date={'$(= Date(addmonths(MonthStart(max(Addmonths_Date)),-11),'DD/MM/YYYY'))'} >} [Indicateur.Value])
/
sum({<Indicateur.Code = {'PO.1.137b'},[Site.isYFPO]={'$(vChange)'},[Site.Participe]={'49|50'},Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date.MonthEnd =, MonthYear=,Date=,NewTestvb1=,Addmonths_Date={'$(= Date(addmonths(MonthStart(max(Addmonths_Date)),-11),'DD/MM/YYYY'))'} >} [Indicateur.Value])
,'###.#%', blue())
Can anyone please help me on this as i am not able to find anything on community ??
@Aspiring_Developer Go to chart properties->Appearance-> Colors and legend> from dropdown select "By expression" and put below expression
=Pick(match(
valuelist('Unlimited Contracts N-1','Fixed Term Contracts N-1','Total Temps N-1'),
'Unlimited Contracts N-1','Fixed Term Contracts N-1','Total Temps N-1'),
RGB(...),RGB(...),RGB(...))
Similarly you can apply colors to other chart
Instead of creating the value list why don't you create an Inline load and try defining the color !! that would definitely work rite
Hi,
Select the 'color by expression' option in Color section and try following expression:
If('Unlimited Contract N-1'=Blue(),
If('Fixed term Contract N-1'=Red(),
If('Total Temps N-1'=Green(),white())))
Thanks,
Usama
I tried , it didn't worked
I am using show and hide container to show multiple views of the report. Could you explain more briefly please
@Aspiring_Developer What is the condition of giving color?
there is no such specific condition. I am using the value list dimensions in multiple charts and they all are showcase in same screen , i want to define same colors for all the dimension in all charts . Please see below view:-
=valuelist('Unlimited Contracts','Fixed term Contracts','Total Temps')-Dimension of first chart
==valuelist('Unlimited Contracts N-1','Fixed Term Contracts N-1','Total Temps N-1')- Dimension for second chart
Now, I want to achieve below:-
Unlimited Contracts & Unlimited Contracts N-1= Should have the same color in both charts (Any color may be blue)
Fixed term Contracts & Fixed term Contracts N-1= Should have same color in both charts (Any color may be red)
Total Temps & Total Temps N-1== Should have same color in both charts (Any color may be Green)
I am not able to understand , how can we assign colors when we use value list for dimensions and measures.
Please help.
@Aspiring_Developer Go to chart properties->Appearance-> Colors and legend> from dropdown select "By expression" and put below expression
=Pick(match(
valuelist('Unlimited Contracts N-1','Fixed Term Contracts N-1','Total Temps N-1'),
'Unlimited Contracts N-1','Fixed Term Contracts N-1','Total Temps N-1'),
RGB(...),RGB(...),RGB(...))
Similarly you can apply colors to other chart
Hello Kush,
I tried below in the :-
Color code expression :-
=Pick(match(valuelist('Unlimited Contracts','Fixed term Contracts','Total Temps'), Blue(), red(), Green() ))
It is giving me below output:-
It is not working, please suggest
Also for the chart i am using this expression:-
if(Valuelist('Unlimited Contracts','Fixed term Contracts','Total Temps')='Unlimited Contracts',
num(sum({$<Indicateur.Code = {'PO.1.2'},Date=,Date.MonthEnd=,NewTestvb1=,Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date= {"$(=MonthStart(Max(Date)))"}, Site.Participe = {'49|50'},[Site.isYFPO]={'$(vChange)'}>} Indicateur.Value)
/
sum({$<Indicateur.Code = {'PO.1.7'},Date=,Date.MonthEnd=,NewTestvb1=,Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date= {"$(=MonthStart(Max(Date)))"}, Site.Participe = {'49|50'},[Site.isYFPO]={'$(vChange)'}>} Indicateur.Value)
,'###.#%' )
,
if(ValueList('Unlimited Contracts','Fixed term Contracts','Total Temps')='Fixed term Contracts',
num(sum({$<Indicateur.Code = {'PO.1.5'},Date=,Date.MonthEnd=,NewTestvb1=,Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date= {"$(=MonthStart(Max(Date)))"}, Site.Participe = {'49|50'},[Site.isYFPO]={'$(vChange)'}>} Indicateur.Value)
/
sum({$<Indicateur.Code = {'PO.1.7'},Date=,Date.MonthEnd=,NewTestvb1=,Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date= {"$(=MonthStart(Max(Date)))"}, Site.Participe = {'49|50'},[Site.isYFPO]={'$(vChange)'}>} Indicateur.Value)
,'###.#%')
,
if(Valuelist('Unlimited Contracts','Fixed term Contracts','Total Temps')='Total Temps',
Num(sum({$<Indicateur.Code = {'PO.1.3'},Date=,Date.MonthEnd=,NewTestvb1=,Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date= {"$(=MonthStart(Max(Date)))"}, Site.Participe = {'49|50'},[Site.isYFPO]={'$(vChange)'}>} Indicateur.Value)
/
sum({$<Indicateur.Code = {'PO.1.7'},Date=,Date.MonthEnd=,NewTestvb1=,Date.Year = , Date.MonthName = , Date.Quarter =, Date.Month =, Date= {"$(=MonthStart(Max(Date)))"}, Site.Participe = {'49|50'},[Site.isYFPO]={'$(vChange)'}>} Indicateur.Value)
,'###.#%' ) )
)
)