# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted Not applicable

## Question on set analysis, percentage of subtotal

Hey folks,

Trying to learn about set analysis by working on a KPI element.

To illustrate I made some sample data:

BrandModelMeasure
xa1
xa2
xb3
yc4
yc5
yc6

I want to create a KPI that shows the "percentage of subtotal" based on what brand or model I select. So if I select "Model=b" I want the KPI to show the percentage of subtotal for brand x. ie 3/6=50% but so far I have only been able to figure out how to calculate the percentage of the TOTAL for all brands giving me 3/21=14% using Sum(Measure)/Sum({1}Measure)

Any ideas from you clever people?

/Andreas

Tags (2)
5 Replies MVP

## Re: Question on set analysis, percentage of subtotal

Try this:

Sum(Measure)/Sum({<Model, Brand = p(Brand)>}Measure) MVP

## Re: Question on set analysis, percentage of subtotal

Maybe like

Sum(Measure)/Sum({<Model=, Brand=p()>} Measure) Not applicable

## Re: Question on set analysis, percentage of subtotal

You may also create straight table with dimension, brand and model, and expression, SUM(TOTAL<Brand,Model>Measure)/SUM(TOTAL<Brand> Measure) to show KPI for all brand/model in the table together.

Honored Contributor

## Re: Question on set analysis, percentage of subtotal

Hi Andreas,

 Model Brand x y a 50% - b 50% - c - 100%

Cheers

Andrew Not applicable

## Re: Question on set analysis, percentage of subtotal

Thanks a lot for the replies guys! The p() function did the trick this time.

/Andreas