# Qlik Sense App Development

Announcements
New Contributor

## Calculate the percentage with different groups

Hi All,

I am having issue with Percentage calculation with different group elements.

 GroupName SBU Mod  Amount Sales Commission 204,045,960 Sales Customer Support 989,000,000 Sales Manufacturing -Parts Export 56,702,200 Sales Slim 1,511,273,500 Sales Turnkey 830,075,000 Material  Cost Customer Support -411,150,000 Material  Cost Manufacturing -Parts Export -33,371,320 Material  Cost Slim -1,049,064,100 Material  Cost Turnkey -570,420,000

In the above report Client wants the percentage calculation ie.,  materialcost  Customer Support (-411150000) divided by

sales Customer Support (989000000) and MaterialCost Manufacturing Parts Export (-33371320) divided by sales Manufacturing Parts Export (56702200) and so on...

And all the calculated Percentages will be displayed only in material cost respective fields and in sales fields it should show 0.

Regards,

Jay

Tags (3)
1 Solution

Accepted Solutions
MVP

## Re: Calculate the percentage with different groups

Seems like you have two spaces between Material and Cost... try this

```Sum({<GroupName = {"Material  Cost"}>} [Mod  Amount])
/
Sum(TOTAL <SBU> {<GroupName = {"Sales"}>} [Mod  Amount])```

This worked for me in QlikView

4 Replies
MVP

## Re: Calculate the percentage with different groups

Try this

```Sum({<GroupName = {"Material Cost"}>} [Mod Amount])
/
Sum(TOTAL <SBU> {<GroupName = {"Sales"}>} [Mod Amount])```
New Contributor

## Re: Calculate the percentage with different groups

Hi Sunny,
But I am getting 0 with the above code.
Regards,
Jay
MVP

## Re: Calculate the percentage with different groups

Seems like you have two spaces between Material and Cost... try this

```Sum({<GroupName = {"Material  Cost"}>} [Mod  Amount])
/
Sum(TOTAL <SBU> {<GroupName = {"Sales"}>} [Mod  Amount])```

This worked for me in QlikView

New Contributor

## Re: Calculate the percentage with different groups

Hi Sunny,
Its working perfectly .
Thank you very much
Regards,
Jay