Qlik Community

Ask a Question

Qlik Sense Deployment & Management

Discussion board where members learn more about Qlik Sense Installation, Deployment and Management.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Partner
Partner

Use a defined KPI in another KPI measure in master items?

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

1 Solution

Accepted Solutions
Specialist II
Specialist II

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 )

Capture.PNG

then add your mesure in the variable editor

Capture.PNG

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

https://www.youtube.com/watch?v=uFT-PNf_z9g

View solution in original post

4 Replies
Specialist II
Specialist II

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 )

Capture.PNG

then add your mesure in the variable editor

Capture.PNG

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

https://www.youtube.com/watch?v=uFT-PNf_z9g

View solution in original post

Partner
Partner

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"

Specialist II
Specialist II

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

Partner
Partner

Hi Bruno,

Hm that sounds complicated. The first variant you have explained works.


Thank you.


Regards



Tim