Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bekahbeets
Creator
Creator

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
Anil_Babu_Samineni

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.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
devarasu07
Master II
Master II

Hi,

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

Capture.JPG

Anil_Babu_Samineni

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.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
bekahbeets
Creator
Creator
Author

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