Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
steveniow
Contributor III
Contributor III

Percentage Calculation wrong in Total Column

Hi,

 

I have a pivot table in which I calculate "count({<CurrentIP={'Y'},PathwayRevIdxChange={1}>}DISTINCT Hospid)"and then a % column "count({<CurrentIP={'Y'},PathwayRevIdxChange={1}>}DISTINCT Hospid)/sum(PWCount)"

The percentage given for each individual column is correct but the Total is incorrect. Not sure why I cannot insert a screen shot. Sorry.

Can anyone explain why and how to correct please?

Kind regards

Steve

 

 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

May be this

[#]/sum(TOTAL <WardCode> PWCount)

View solution in original post

18 Replies
sunny_talwar

What are you getting and what do you expect to see? Without knowing this, it would be difficult to give much help... can you may be mockup few rows to show what you get?

Brett_Bleess
Former Employee
Former Employee

Steven, I have let the site admins know you were having an issue with posting image etc., they should be getting in touch hopefully, and then maybe that will allow you to answer Sunny such that we can try to get you some help here.  I do have one thing though, check out the following, this may be what is wrong with the total now that I think about it:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/ChartFunctions/...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Sue_Macaluso
Community Manager
Community Manager

@steveniow Hi there,  Are you referring to adding a screenshot to this post?  If this is the case, you can click on the little camera on the top of the body of this message.  I have provided a screenshot below.  If you are talking about a screenshot somewhere else can you please elaborate on that.  I signed on as you verified that you have the capability, so if it is on this community platform, you might need to check with your IT. Let us know either way. You cannot edit your post after it's been replied to, however for your screenshot just add a comment or reply and you will be able to add.  Thank you for participating. 

screenshot_insert_photo.png

Sue Macaluso
steveniow
Contributor III
Contributor III
Author

thank you

steveniow
Contributor III
Contributor III
Author

HI Sunny,

looks like this may work?

Just to confirm - 4/219 is 1.8% not the 2.3% showing in he table.

Capture.PNG

steveniow
Contributor III
Contributor III
Author

Thanks Brett, I have tried using the aggr function but to no avail. I changed the formula shown to

avg(aggr(count({<CurrentIP={'Y'},PathwayRevIdxChange={1}>}DISTINCT Hospid)))

Capture.PNG

kind regards

Steve

sunny_talwar

What is your expression for #?

steveniow
Contributor III
Contributor III
Author

count({<CurrentIP={'Y'},PathwayRevIdxChange={1}>}DISTINCT Hospid)

sunny_talwar

I am not able to understand the issue, may be because I don't see it. Would you be able to share a sample to show the issue?