Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sasukeindra
Contributor II
Contributor II

Concatenate values based on sales growth

Hi all,

can you please help me with the following...

Initially the requirement was to change the bar colors on the bar charts on the ids that had 3 years of sales growth.

In the color condition I had something like this:

IF(

SUM( {<YearSale={2022}>}Sales)

>

SUM( {<YearSale={2021}>}Sales)

AND

SUM( {<YearSale={2021}>}Sales)

>

SUM( {<YearSale={2020}>}Sales), Green(), Grey()

)

That worked and had the dimension colored green if it had those creterias.

However the client changed the ideia, and whats a button that will filter out the ids, and get only those with sales growth in the past 3 years.

Any ideias on how can I concatenate the ids with those creterias?

 

I try to use the same logic with the expression above but it didnt work.

 

Thank you in advance for yout help.

1 Reply
edwin
Master II
Master II

since you already have logic to lookup the top 3 IDs, you should be able to create a concat distinct of those IDs.  concat them using delimiter semi-colon.  create a button that selects values in  field, set field to ID, and your values can either be the expression that concats the IDs or better yet, create a variable that stores the concat result and use that variable in the values for the button.  the best way to test this is to first hard code the 3 IDs separate by semi-colon and see if it is successful in selecting the IDs.