Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am very new to qlik sense and all the coding stuffs are new to me. Hope someone can help me navigate around this!
I created a tree map for projects with two dimensions- month and stage, and measure - the amount of money. I want to group them by month and color by stage. I managed to do that but I want to 1) assign a specific color instead of using the pre-assigned color by qlik sense, 2) order the groups (months) chronologically; it's in random order now.
Could someone please help with this? I've been trying to read discussions but not sure where to put these expressions or codes and what not....?
Thank you
Hi Seona,
I found the below thread about treemap sorting. As I said before, treemap is measure driven and sorting is dependent of the measure.
If you think that I was able to answer your questions, please mark this discussion as complete by clicking one of the answers as "Correct Answer".
Thank you.
Hi Seona,
On the right pane, in the appearance tab, there is an option for colors. You can change colors by dimensions or measure.
Just to make sure that "Colors" switch is off so that you can assign custom colors.
And in terms of ordering, you can use the Data tab to sort the order of the treemap:
Hope this helps.
Hi Sinan -- thanks for the quick reply!
I have already used the appearance tab by switching off the custom color but I want to use specific colors. Using the example of yours above, for example, I want to change the 2015-01 color (currently skyblue) to red. How can I assign specific colors to specific item?
Also, in terms of ordering the months, I have already used the data tap and put the 'Month' tap on top of other dimensions but I want to have them ordered chronologically from January to December (from left to right). Would I have to make separate columns or .. sort by expression (which is the part that i'm the most confused about).
Thank you for your help!
Hi Seona,
I have tried to apply a function to change the colors of treemap and it didn't work so I am not quite sure if this is possible in QlikSense. Hopefully, someone from Qlik could answer this question.
The sorting part is related to the measure. I think that treemap is measure driven so I tried to sort it by date and it didn't sort chronologically:
I personally believe this is as a result of 2015-05 and 2015-06 having less values than other months.
Hopefully, someone else has another opinion on this one.
Hi Seona,
I just figured it out the color part of it.
In the colors tab, choose "By expression" and type your if statement, please see below:
Here is the expression that I used to change the colors of dimensions:
Thanks
Hi Sinan!
The expression didn't work for me. Should I write something in the data load editor beforehand?
Would you mind sending me your expression?
Thanks
Here is my expression.
if(DESC:Stage = '5_Final Proposal Submitted',RGB(255,255,255),RGB(0,0,0))
Can you change it to this
If(Stage = '5_Final Proposal Submitted', RGB(255,255,255),RGB(0,0,0))
I am not sure what "DESC:Stage" is? Is it the full dimension name?
Yes, that's the full dimension name actually. haha