Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
melwilson
New Contributor II

Calculations containing set analysis in Pivot table

Hello.

I am having a problem with set analysis in a pivot table.

I have created a small table with two out of many KPIs:

KPI          Amount

A             150

B             280    

Total        430

Using KPI as a dimension and  the expression:

sum({<KPI = {,} >} Amount)

and then clicking on showing partial sum to get Total at the bottom.

I am using another expression to try to get another column to show the amount for both A and B as a percentage of another KPI.

When I try to calculate it as a percentage of another KPI I am having problems.  I want to try and get this:

KPI          Amount      Percentage

A             150               3.7%

B             280               7%

Total        430

However, its is coming out as

KPI          Amount

A             150

B             280    

Total        430          10.8%

The expression I am using is:

=num(sum({<KPI = {,} >} Amount)

/

sum({<KPI = {} >} Amount),

'#,#%')

How do I use set analysis to get the percentages against each KPI instead of only as a total ?

Thanks for any help you can suggest.

Mel

1 Solution

Accepted Solutions

Re: Calculations containing set analysis in Pivot table

Try this

=Num(Sum({<KPI = {,} >} Amount)

/

Sum(TOTAL {<KPI = {} >} Amount),

'#,#%')

2 Replies

Re: Calculations containing set analysis in Pivot table

Try this

=Num(Sum({<KPI = {,} >} Amount)

/

Sum(TOTAL {<KPI = {} >} Amount),

'#,#%')

melwilson
New Contributor II

Re: Calculations containing set analysis in Pivot table

Hi, Sunny.

That is perfect.

Thankyou for responding so quickly. It has really helped me out.

Mel.