Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
bekahbeets2003
Contributor

Color by expression with year(date) doesn't work in pie chart

So i have the following expression in the color by expression editor:

if (year([Date of Service])= 2015, blue(),

if (year([Date of Service])= 2016, yellow(), 

if (year([Date of Service])= 2017, red(), green())))


It works in the bar chart, but not in the pie chart? I am a bit confused

1 Solution

Accepted Solutions

Re: Color by expression with year(date) doesn't work in pie chart

I suggest you to create the Year field in Script like Year([Date of Service]) as Year and then use same expression instead of calc. use Year is the straight forward.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

3 Replies
devarasu07
Honored Contributor II

Re: Color by expression with year(date) doesn't work in pie chart

Hi,

expression seems no issue and its working. can you brief more. tks

Capture.JPG

Re: Color by expression with year(date) doesn't work in pie chart

I suggest you to create the Year field in Script like Year([Date of Service]) as Year and then use same expression instead of calc. use Year is the straight forward.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

bekahbeets2003
Contributor

Re: Color by expression with year(date) doesn't work in pie chart

I am in Qlik Sense desktop. Do qvw files work there?