Skip to main content

App Development

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

Announcements
An issue has been identified on Qlik Cloud hub, please visit our Status Update Page for details: GET THE LATEST
cancel
Showing results for 
Search instead for 
Did you mean: 
DRneel
Contributor III
Contributor III

How to create filters on color

Hello Experts,  

                              I always come to you with expectations of getting some solution and always I received some. Thanks.

 

I have 2 columns in a table  where I have current value and previous value and based on that I calculate the % of value difference in Qliksesnse through  a new measure say "% DIFF" and I color  the field in a PIVOT table  by checking it's value for some ranges like , >50% RED(), >30%, AMBER and rest GREEN.

Now I want to have a filter where  the user will be able to filter on these percentages or COLOR codes. Say if the user wants to see only the RED colors or >50%. Can someone please help.

 

1 Reply
PradeepK
Creator II
Creator II

As data in selection state will change as per diff filters.. you need to create Calculated Dimension

Use below template:

Aggr(
if(<Master Measure> <condition> , <Required Values>)
,<Dim List>
)

 

Example

Master measure: (Growth)

( sum(Sales) / sum(PreviousSales) ) - 1

 

Master Dimension:(Color)

=Aggr(
  if(Growth < 0 , 'Red', 'Green')
  ,Month
)

 

Result:

DynamicColorCode.gif