Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Dynamic Colors of Measures

Hello Team,

In Qlik Sense we are using a line chart with 2 measures and we want custom colors.

Below is the script :

Load * Inline [
SurveyYear,SurveyId,Role,Value
2017,1,HR,1
2017,2,Finance,6

2016,1,HR,7
2016,2,Finance,4

];

 

Dimension : SurveyYear

We have used variable extension with two values ,Value and Count and line chart values should change based on that.

Created a variable named vtest1 with two values Value and Count(Render as Select option)

Measure 1 :  

pick(1 + match(vtest1,'Count'),
Sum(Value),
Count(SurveyId))

Measure 2 :

pick(1 + match(vtest1,'Count'),
Sum({$<Role = {'HR'}>}Value),
Count({$<Role = {'HR'}>}SurveyId))

 

Here we are getting colors blue and red for two measures , how can colors be changed to say green and yellow.

 

Thanks & Regards,

Arvind

Labels (3)
1 Reply
Highlighted
Partner
Partner

Hi,,

You can define your own colors to Measures in Qlik Sense.

 

Go to Master Items >>> Create New Measure>>> Paste your Expression>>>>>Measure Name>>>>Define Measure Color.

Use this Master Item Measure in Charts.

Thanks

Mustaq