Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have some functions that I'm using more than once in chart/table creation in qlikview:
I have a few concerns. Whenever I try to store my function:
=(SUM({<[Not_my_Dummy] = {'1'}, some_dummy= {'1'}>} [0-7_dummy]) + SUM([ACDV_0-7_dummy]))/(COUNT({<[Not_my_Dummy] = {'1'}, some_dummy= {'1'}>} [0-7_dummy]) + COUNT([ACDV_0-7_dummy]))
into a variable it causes some issues...
First, this is how my chart looks with my Dimension set to Month:
BUT, if I click on ANY of these given months, the value suddenly changes to what "may or may not be" the correct number:
Why is Qlikview doing this? surely people can't be reusing functions over and over in each chart/table they create, only to change them all one-by-one if needed....
Also, I have the SAME function stored in a chart/table with the SAME dimension, and qlikview returns different numbers.... has anyone else had an issue with this?
Do not use = when storing the expression into variable.
(SUM({<[Not_my_Dummy] = {'1'}, some_dummy= {'1'}>} [0-7_dummy]) + SUM([ACDV_0-7_dummy]))/(COUNT({<[Not_my_Dummy] = {'1'}, some_dummy= {'1'}>} [0-7_dummy]) + COUNT([ACDV_0-7_dummy]))
How did you define your variable?
Do not use = when storing the expression into variable.
(SUM({<[Not_my_Dummy] = {'1'}, some_dummy= {'1'}>} [0-7_dummy]) + SUM([ACDV_0-7_dummy]))/(COUNT({<[Not_my_Dummy] = {'1'}, some_dummy= {'1'}>} [0-7_dummy]) + COUNT([ACDV_0-7_dummy]))
I suspect that your variable definition begins with the equal sign, right? If that's the case, it means that your expression is being calculated once, not in the context of your chart dimensions. For that reason, you are getting identical values across the chart. For the same reason, the result looks better if you make a selection - after your selection, the formula in the variable gets evaluated again, and it shows a "better" result now.
Long story short - remove the equal sign in front of your formula in the variable definition and see what happens.
cheers,
Oleg Troyansky
Learn advanced QlikView and Qlik Sense techniques in my book QlikView Your Business
Have a read