Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am maintaining a very large QlikView application (1.5GB)
An issue occurs on selected bars. See the image 3rd row, the pale green and blue color shouldn't be, they should be yellow and red. The color is defined under the expressions option for colors. You can see that it works on some bars, but not all.
Now the current fix that works, but I would not want it to be like that, is by clicking on the wrong colors. See the click one and click two
Once I see the No data to display, it removes also the Application Settings which are selections that are selected as you open the application. Once I put the setting to the beginning state, the colors are correct:
As you can see now the colors are correct.
Does anyone have an idea why this is happening? Or at least where I could look for the problem or a reason this is happening?
Maybe you could get a hint to the cause respectivelly what's different if you compares this specific object within the prj-folder and within the xml-metadata from the qvw (just open it within an editor like notepad++).
Another thought is to check if all accesses to this application happens with the same QV release and if the application and the object was created with the current release. Often a mix of the used releases worked quite smoothly and so many don't think about it - but you could never be sure that really everything worked.
- Marcus
It might be just a bug. But there are also natural reasons possible, for example if the used color-expression doesn't returned always a valid result. This might be caused from your mentioned OnOpen actions which aren't mandatory executed in a sequentially way else they could be executed in parallel in a random order. If those actions aren't completely independent to each other the order of their execution may change the results.
- Marcus
I don't think it is a bug, since it has worked in the past and this isn't a recent add. But I will try removing the OnOpen actions. At first tried just opening the app, reselecting the OnOpen selections, but that didn't do much.
Another thing that I have found, is if I load the problematic tab as the first one, as I open the *.qvw, then the colors are fine, if it is as fourth tab out of ten tabs, then the problem occurs
Could you post your color expression?
Troubleshooting ideas to try:
-Double check what the default colors are set to. If it is that dark blue, then perhaps the expression is not evaluating correctly on some filters and putting the default color.
-You can also try removing the color expression entirely and see if the default colors are persistent and working correctly.
Thats what is happening, the odd colors are the default one. What I also did was add the RGB(0,0,0) to the color expresion as false, which worked. So it looked like if(Column='1', $(var.Green),if(Column='2',$(var.Yellow),if(Column='3',$(var.Red),RGB(0,0,0)))) So the default colors turned black. But then when I select the default colors, it goes to the "No data to display", re-select the settings and the colors are normal.
I did consider putting the default colors, but there could be periods that not all 3 are show, so the legend could have 1(which would be green and correct) and a 3(which should be red, but would be yellow) and that would not be correct, so I always need to have all 3 in the legend and they always have to have the correct color scheme.
Just an idea to avoid the risks of rounding errors and to make sure that always numerical values are compared to each other is to add something like this to your comparing:
if(floor(Column) = floor(1), ....
- Marcus
Added the floor() to the expression, but it didn't do anything.
At this point I am open for any solution.
Another thing I have found is that if I create a table with the data I am viewing (e.g. '1','2','3') it doesn't show all the data.
So I would choose one bar out of all, it is made of two data - '1' and '3'. Now creating a table with just showing the column of the said data, it only show '3'.
If objects behave strangely and/or the data are unexpected in any way and no obvious reason is found in a rather short time I usually create a table-chart and include all related dimensions, expression-parts and variables. Not everything at once else in a more or less step by step approach. If needed it includes also various checks on the intermediated steps like len(expression-part), isnull(variable), frac(variable), num(expression) and so on.
With it you should find earlier or later the cause.
- Marcus