Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

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

Calculate the percentage with different groups

Hi All,

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

Please find below my report

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.

Please help me in this.

Regards,

Jay

 

1 Solution

Accepted Solutions

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

image.png

4 Replies

Re: Calculate the percentage with different groups

Try this

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

Re: Calculate the percentage with different groups

Hi Sunny,
Thanks for quick Reply
But I am getting 0 with the above code.
Please help me
Regards,
Jay

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

image.png

djaykumar
New Contributor

Re: Calculate the percentage with different groups

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