Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
johann_bauer
Partner - Contributor III
Partner - Contributor III

row based calculation of measures

Hey Guys,

im facing following problem.

I have a table with 3 rows and 3 measures. The Dimension KPI has 2 characteristics (EXT/INT) which I can use as a Filter.

For the calculation of the measures, Im using Set analysis.

The Customer needs different calculations for the KPI´s.

For example EBIT and OE should be filtered on the characteristic (EXT/INT) but for the calculation of CR we need the total of this both characteristics, no matter if I select EXT or INT.


KPIMeasure1Measure2Measure3
EBIT12
CR13
OE13

My first thought was to use an IF Statement, like this:

IF(KPI='CR',Sum({1<....>}Value),Sum({$<....>}Value))

But the KPI are never explicitly selected, so this is not working for me.

Can I solve this in the Chart or do I need the change my Script.

KR

Johann

1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum({<KPI = {'OE', 'Rev'}>}VALUE) + Sum({<KPI -= {'OE', 'Rev'}, Scope>}VALUE)

Capture.PNG

View solution in original post

7 Replies
sunny_talwar

But the KPI are never explicitly selected, so this is not working for me.

What do you mean when you say KPI are never explicitly selected?

johann_bauer
Partner - Contributor III
Partner - Contributor III
Author

I mean they are not selected in a filter pane. All KPI are shown in the table

sunny_talwar

I am still not sure what you are looking to get and what is the issue you are running into, but try this

If(Only({1} KPI) = 'CR', Sum({1<....>}Value),Sum({$<....>}Value))

johann_bauer
Partner - Contributor III
Partner - Contributor III
Author

Hey Sunny,

thank you for your reply. I will try your soultions. If it wont work i will attach a qvf file with a more detailed description of my problem.

KR

Johann

johann_bauer
Partner - Contributor III
Partner - Contributor III
Author

Hey im still on this issue,

I will upload my qvf, so maybe this will make my problem clear more understandable.

sunny_talwar

Try this

Sum({<KPI = {'OE', 'Rev'}>}VALUE) + Sum({<KPI -= {'OE', 'Rev'}, Scope>}VALUE)

Capture.PNG

johann_bauer
Partner - Contributor III
Partner - Contributor III
Author

Hi Sunny,

thank you for your help