Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to divide a row with sum of specific rows of same column?

Below is the data, i want to create the calculation column in a straight table/barchart who's formula is given in the Fornlula tab, in my actual data it's a Bar chart and it's in an alternate state and expression for that is below:

sum({[State Bar]<Store=$::Store>}Count)

My problem is how do i calculate table like this in QlikView:

sum({[State Bar]<Store=$::Store>}Count)/sum(??????)

So that when i update the alternate state's filter these calculations update accordingly

ClassSum of CountCalculationFormula
A171471202.43%A17/(CP1+CT1+B20)
A18971021.61%A17/(CP1+CT1+B20)
B20F95990.16%A17/(CP1+CT1+B20)
A3120180.20%A17/(CP1+CT1+B20)
A27771114.91%A2/B2
A123436144.52%A12/B12
A829614.18%A8/B8
A614863121.85%A6/B6
CP11577703
CT11966106
B202501229
B2521042
B1277174
B82087
B612198

Thanks in Advance

16 Replies
Anonymous
Not applicable
Author

Yes, Blank or "-" whatever should come but above calculation should be the output

sunny_talwar

I used the exact same expression (except removing unwanted things)

=Sum(Orders)/

If(Match(Group, 'Appliance Refinishing', 'Appliance Repair - Large'), Sum(TOTAL {<Group = {'Appraisals - Real Estate','Architects & Building Design','Artwork/Murals'}>}Orders),

If(Group = 'Appliance Repair - Small', Sum(TOTAL {<Group = {'Asbestos Removal'}>}Orders),

If(Group = 'Appliance Sales', Sum(TOTAL {<Group = {'Auction Services'}>}Orders))))

to get this

Capture.PNG

This matches exactly with your Excel... is that not what you want?

Anonymous
Not applicable
Author

Okay.. but sometimes i don't get one or two out of these.. That's fine.. Thanks for your help!

sunny_talwar

May be there is a mismatch in the name either in the Match statement or within the set analysis may be? Difficult for me to say without having a look at this

Anonymous
Not applicable
Author

Sure.. You may have a look.. I'm tired of finding bugs..

sunny_talwar

Once again, I fail to understand the use of dummy data with original application?

Capture.PNG

Also, some of the things are not available here

Capture.PNG

Asbestos Removal and Auction Services are missing from Class or Group....

baltazarj
Contributor III
Contributor III

I have experience now the same issue. I got my answer after I select up to the third filter. I have wrong answer when I only select something from first and second filter. Why do I need to select up to the third filter? I also want to get my answer even I only first or up to second filter.

 

Thank you in advance.