Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I'm fairly new to Qlik so please excuse me, if this question is obvious.
I have a table and I want to make a heatmap per column which is darkest at the highest number and lightest at the lowest number. Kinda like this:
To do this, I have the following variables stored in my variables section:
In the column that I want the heatmap to be in I then have the following syntax for the background colour:
$(v_blue(([Ums. BJ] * 255) / $(vMax_X_je_Y([Ums. BJ], Produktgruppen))))
This gives me the following error:
Error in expression: ')' or ',' expected
ARGB(([Ums. BJ] * 255) / Max(Aggr([Ums. BJ],16,101,128)
Obviously there are a few brackets missing here but I do not understand where they go missing. Both variables say that the syntax is fine. Does anyone have any idea here, how I could fix this?
Many thanks in advance.
Oh, and I want to give credit cause the idea isn't mine but taken from the Qlik App Analyzer App.
I would use a different approach and try colormix1 for what you are doing. This uses less variables and should give you the desired output as shown in your request.
colormix1(Rank([Ums. BJ])/NoOfRows(TOTAL),rgb(16,101,128),rgb(255,255,255))
At least in this is a missing bracket:
Max(Aggr([Ums. BJ],16,101,128)
But IMO several parts of your approach are looking suspicious and therefore I suggest that you check each single sub-part of all variables and calculations in separate expressions to ensure that they are working as expected because it could become quite hard to detect a mistake in such complex nested approach.
I checked both variables individually and they are both working fine. The issue only seems to happen as soon as I use them together as shown above. As soon as I do this, some brackets go missing along the way. Could you maybe let me know which parts of my approch seem "suspicious" to you as you phrased it? I would love to investigate.
Does the variables are containing an expression-string which should be evaluated in the context of the call or an already evaluated value - and does this result is containing a comma or any kind of quotes?
If yes, it will lead to trouble if they are combined or even nested in further calculations. As far as there is a comma in a variable-result it's not valid number anymore and nested in other variables the commas are treated as a parameter-delimiter.
I would use a different approach and try colormix1 for what you are doing. This uses less variables and should give you the desired output as shown in your request.
colormix1(Rank([Ums. BJ])/NoOfRows(TOTAL),rgb(16,101,128),rgb(255,255,255))