Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

johann_bauer
New 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

Re: row based calculation of measures

Try this

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

Capture.PNG

7 Replies

Re: row based calculation of measures

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
New Contributor III

Re: row based calculation of measures

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

Re: row based calculation of measures

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
New Contributor III

Re: row based calculation of measures

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
New Contributor III

Re: row based calculation of measures

Hey im still on this issue,

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

Re: row based calculation of measures

Try this

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

Capture.PNG

johann_bauer
New Contributor III

Re: row based calculation of measures

Hi Sunny,

thank you for your help

Community Browser