# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Contributor III

## Percentage issue,

So i have a table bellow are the column and expression . Some how percentages total label is incorrect where as by category is correct

Column 1 Total

if(Sum({< Is={'T'}, [ CAT Name] = {'T I'} >} [ Sold] )>0,
Sum({< Is={'T'}>} [Sold] ))

Column 2  GRE

if(Sum({< Is={'T'}, [CAT Name] = {'T I'} >} [ Sold] )>0,
Sum({< Is={'T'}, [CAT Name] = {'T I'} >} [ Sold] ))

total percentages

if(Sum({< Is={'T'}, [CAT Name] = {'T I'} >} [ Sold] )>0,
Sum({< Is={'T'}, [CAT Name] = {'T I'} >} [Sold] ) / Sum({< Is={'T'} >} [Sold] ))

1 Solution

Accepted Solutions
Highlighted
MVP

## Re: Percentage issue,

May be this

```Sum({<Is={'T'}, [CAT Name] = {'T I'}>} [ Sold])
/
Sum(Aggr(
If(Sum({< Is={'T'}, [ CAT Name] = {'T I'} >} [ Sold]) > 0, Sum({<Is={'T'}>} [Sold]))
, \$(='[' & GetCurrentField([Group Name]) & ']'))))```
8 Replies
MVP

## Re: Percentage issue,

What is wrong? If 18.1% is not right then what is right?

Contributor III

## Re: Percentage issue,

664518 of 2650572 is 24.95

Contributor III

## Re: Percentage issue,

Opps i attached wrong  File . editing soon

Contributor III

## Re: Percentage issue,

Please see the attachment now thanks

MVP

## Re: Percentage issue,

Try this

```Sum({<Is={'T'}, [CAT Name] = {'T I'}>} [ Sold])
/
Sum(Aggr(  If(Sum({< Is={'T'}, [ CAT Name] = {'T I'} >} [ Sold]) > 0, Sum({<Is={'T'}>} [Sold])), Dimension))```
Contributor III

## Re: Percentage issue,

Thanks Sunny, it  worked perfectly , however it has Cycle group  dimension , so it only works for one dimension . is there a way to works in all dimension

Highlighted
MVP

## Re: Percentage issue,

May be this

```Sum({<Is={'T'}, [CAT Name] = {'T I'}>} [ Sold])
/
Sum(Aggr(
If(Sum({< Is={'T'}, [ CAT Name] = {'T I'} >} [ Sold]) > 0, Sum({<Is={'T'}>} [Sold]))
, \$(='[' & GetCurrentField([Group Name]) & ']'))))```
Contributor III

## Re: Percentage issue,

Thanks it worked out perfectly .