Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

need formula for tricky output

Dear All,

Need some help Please find the attachment with expected output.

Thanks

16 Replies
PrashantSangle

Hi,

What is your expression for contr???

try below logic

sum(ContriExpression)/Sum(Total <ST> ContriExpression) * 100

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

I used (SUM(Sale)/ SUM(TOTAL(Sale)))*100

But using above I am not get expected output

kamal_sanguri
Specialist
Specialist

use below expression:

(sum(Sale)/sum(total <ST>Sale))*100

kamal_sanguri
Specialist
Specialist

here is the updated qvw

PrashantSangle

Hi,

try like

(SUM(Sale)/ SUM(TOTAL<ST> Sale))*100


Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
kamal_sanguri
Specialist
Specialist

or you can use :

(sum(Sale)/aggr(nodistinct sum(Sale),ST))*100

Anonymous
Not applicable
Author

Hi Kamal,

in the attachment for ST contribution is missing (71.1 and 28.9)

Please see ex op excel.

Thanks

settu_periasamy
Master III
Master III

Try this ..

=if(Dimensionality()<=3,SUM(Sale)/ SUM(TOTAL(Sale))*100,
sum(Sale)/sum(total <ST>Sale)*100)

kamal_sanguri
Specialist
Specialist

what you want to see is the percentage distribution and the sum of percentage distribution will be equal to hundred.

for ex:

Item Share %dist

a       30     30%

b      40      40%

c      30     30%

subtotal - 100%