Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
geogou1973
Creator
Creator

Colormix in a bar chart in qliksense

Hello,

I have created a bar chart in qlik sense with colormix expression in the tab colors and legend in order to change color in the values of the dimension according to the sales of the current year. The expression is the following.

ColorMix1( rank(total
SUM({<[Year]={"$(vyearcurrent)"},[item_Category1]=,[Item_Category2]=>} [Sales]))
/ NoOfRows(TOTAL) , rgb(250,112,14) ,rgb(234,232,228)) 

The problem is when i choose one Item_Category the colors are changing. How can i keep the first colors that the bar had before the selections.

Has anyone an idea how can i manage this.

Thank you in advanced.

 

2 Replies
Anil_Babu_Samineni

Do you mean like this?

ColorMix1( rank(total
SUM({1<[Year]={"$(vyearcurrent)"},[item_Category1]=,[Item_Category2]=>} [Sales]))
/ NoOfRows(TOTAL) , rgb(250,112,14) ,rgb(234,232,228)) 

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
geogou1973
Creator
Creator
Author

Hello, I have already put the number 1 but nothing is changing. The problem is in the rank total of the summation of sales because when i select a value it takes the number 1 . I can't find the way how i keep the rank of this selection before the selection. From the other hand i have to create a variable to keep stable the NoOfRows(TOTAL) that a have already done.

Finally, I don't understand the comment you wrote :

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

Of cource i have look for a solution in the web and in the community and i can't find anything for this problem and for that reason i placed the question to the community.