Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:
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

1 Solution

Accepted Solutions
MVP

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

Try this

```Sum({<GroupName = {"Material Cost"}>} [Mod Amount])
/
Sum(TOTAL <SBU> {<GroupName = {"Sales"}>} [Mod Amount])```
Contributor
Author
Hi Sunny,
But I am getting 0 with the above code.
Regards,
Jay
MVP

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

Contributor
Author
Hi Sunny,
Its working perfectly .
Thank you very much
Regards,
Jay
Tags
Community Browser