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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Evan0211
Creator II
Creator II

Coloring a pie chart by expression

I have an expression to build a pie chart that compares dates to sort the data.  The expression to create the pie chart works fine, but when I try to use that same expression to build the color by expression, the color never changes.

Example:

=If((not isnull([SA Milestone Revised Date])) and (Date([SA Milestone Revised Date]))  >= Today() 
and isnull([SA Milestone Completed Date])
and
TimeStamp([SA Milestone Revised Date]) >= today()
and
Timestamp([SA Milestone Revised Date]) <= Today()+ $($(vMilestoneFilter))
, lightblue(), //f


If((not isnull([SA Milestone Initial Date]) and isnull([SA Milestone Revised Date])) and (Date([SA Milestone Initial Date])) >= Today() 
and isnull([SA Milestone Completed Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and
TimeStamp([SA Milestone Initial Date]) >= today()
and
Timestamp([SA Milestone Initial Date]) <= Today() + $($(vMilestoneFilter))

, lightblue(), //f
If(not isnull([SA Milestone Revised Date]) and (Date([SA Milestone Revised Date]) < Today() 
and isnull([SA Milestone Completed Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMilestoneFilter)) = 7200
)
, Red(), //pd

If(not isnull([SA Milestone Revised Date]) and (Date([SA Milestone Revised Date]) < Today() 
and not isnull([SA Milestone Completed Date]) and Date([SA Milestone Completed Date] > Date([SA Milestone Revised Date]))
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMilestoneFilter)) = 7200
)
, green(), //cl

If((isnull([SA Milestone Revised Date]) and not isnull([SA Milestone Initial Date])) 
and (Date([SA Milestone Initial Date]) < Today() and isnull([SA Milestone Completed Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMilestoneFilter)) = 7200
)
, Red(), //pd

If((isnull([SA Milestone Revised Date]) and not isnull([SA Milestone Initial Date])) 
and (Date([SA Milestone Initial Date]) < Today() and Date([SA Milestone Completed Date]) > Date([SA Milestone Initial Date])
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold))
and $($(vMilestoneFilter)) = 7200
)
, green(), //cl



If(not isnull([SA Milestone Completed Date])
and $($(vMilestoneFilter)) = 7200 
and [SA TOTAL_REQUIRED_VALUE]>=$($(vDollar_Threshold)), Yellow())))))))
Labels (1)
0 Replies