Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I have defined two measures in master items. KPI A and KPI B.
KPI A is defined as following:
A =
long-term liabilities
+
short-term liabilities.
KPI B is defined as following:
B =
stocks
+
requirements.
I want to create KPI C:
C =
A
-
B.
The situation is, Qlik Sense gives an error message, when I edit formula C and put in A - B.
The only way so far is confusing and following:
C =
long-term liabilities
+
short-term liabilities
-
stocks
-
requirements.
I heard about the possibility of storing formulas in variables and using them in other formulas (in this case "C"). I'm at a loss, because the previous method is very confusing to create KPIs that use other KPIs.
Can someone give me a key word, which allows me to google?
Thanks a lot
Tim
Hi Tim
You can creat variable to store your mesure then call them as another mesure
Exemple
lets say A =
sum([long-term liabilities])
+
sum([short-term liabilities])
create a variable ( clic at the bottom left button )
then add your mesure in the variable editor
Do the same for mesure B
Now you can either create a KPI for C
add as mesure this
=$(A) + $(B)
dollar sign and parenthese are used to call variable
Or create a third variable
Same approch open the variable editor
name your variable as C for example and add as mesure this
=$(A) + $(B)
Then in a KPI just add $(C) as mesure
Hope it helps
PS see on YouTube
Hi Tim
You can creat variable to store your mesure then call them as another mesure
Exemple
lets say A =
sum([long-term liabilities])
+
sum([short-term liabilities])
create a variable ( clic at the bottom left button )
then add your mesure in the variable editor
Do the same for mesure B
Now you can either create a KPI for C
add as mesure this
=$(A) + $(B)
dollar sign and parenthese are used to call variable
Or create a third variable
Same approch open the variable editor
name your variable as C for example and add as mesure this
=$(A) + $(B)
Then in a KPI just add $(C) as mesure
Hope it helps
PS see on YouTube
Hi Bruno,
thanks a lot for your responce. I tried that way.
I'm just wondering about the testimony of a colleague who said that the word code injection is what I should look for. Google said "Code Injection + Qlik zero hits"
Hi Tim
Not sure to understand what your collegue means by "word code injection"
in script editor you can type the first lettre of a dimension and Qlik propose a list of possible occurrence
The same is possible with variable , if you type the first letter of a variable name Qlik will give a list of possible variable name.
But for master mesure and dimension this is not possible.
Regards
Bruno
Hi Bruno,
Hm that sounds complicated. The first variant you have explained works.
Thank you.
Regards
Tim