Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik Community.
I have a good question today.
I have created a Pivot Table which has the dimension as Year and 5 expressions to measure the change metrics. I have rearranged the Pivot Table to have the expressions in the row and the Year(s) as column headers.
My data ranges from 2013 to 2020, and as the user selects years e.g. 2016, 2017, 2018...the Pivot Table shows each year across the columns and the corresponding metric values across the 5 expressions. This is to show the year over year changes occurring e.g. Sales grew from 54% in 2016 to 69% in 2017.
Now, I want to create Table Boxes to go with each expression THAT ONLY SHOW when more than one year has been selected in the Selections field. Each Table Box contains an arrow (Wing Ding) pointing to the next year and the background color conditionally formatted to green if it is an upward growth, yellow if the decline is within 5%, and red if > 5%.
Any help will be truly appreciated. If another object/chart could be a better solution than this please also advise.
Technically it is possible, If you can share output?
You can enable the condition from General tab / Layout like
If(GetFieldSelections(Year)>0,1,0) // Either, You could pause text message for Error like you have not selected anything from Year
And, Then you can use like
If(Measure>=Sum([upword growth]), Green(), If(Measure < 0.5, Yellow(), If(Measure > 0.5, Red())))
Thanks Anil.
I tried an alternative function by creating a variable (Name=TextBox, Value =if(Count(DISTINCT(Year([Dates])))>1,1,0)) and to hide them in the text box properties-->Layout-->Show-->Conditional I used this expression (=TextBox=1) and now when I select one year in the selection box they do not show. But when I select more than one year they show.
I now need to figure out the color coding based on the Pivot Table values. Since I am using a text box as overlay should I reference the chart number or the expression within the chart??
Last point - Yes