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: 
hammermill21
Creator III
Creator III

Calculating Total in Table - Qlik Sense

Hello,

I am trying to calculate a total for a table, I need to count all the total across and then divide it by the count of facilities then divide by 3. So for example, the first row should = 67% but it doesn't work.

I tried:

Count([UHealth Tower])+Count([UMHC Applebaum])+Count([UMHC BPEI])+Count([UMHC Coral Spg])+Count([UMHC Deerfield])+Count([UMHC Ear Institute])+Count([UMHC Hollywood])+Count([UMHC IR Clinic])+Count([UMHC Kendall])+Count([UMHC LFMC])+Count([UMHC Marlin Park])+Count([UMHC Pain Clinic])+Count([UMHC Plantation])+Count([UMHC Radiology])+Count([UMHC Safie])+Count([UMHC SCCC])

/

SUM([UHealth Tower])+SUM([UMHC Applebaum])+Sum([UMHC BPEI])+Sum([UMHC Coral Spg])+Sum([UMHC Deerfield])+Sum([UMHC Ear Institute])+Sum([UMHC Hollywood])+Sum([UMHC IR Clinic])+Sum([UMHC Kendall])+Sum([UMHC LFMC])+Sum([UMHC Marlin Park])+Sum([UMHC Pain Clinic])+Sum([UMHC Plantation])+Sum([UMHC Radiology])+Sum([UMHC Safie])+Sum([UMHC SCCC]) /3

Which is counting all the facilities then / by the sum total of each column then / by 3 but it doesn't work.

1 Solution

Accepted Solutions
sunny_talwar

Try this

(SUM([UHealth Tower])+SUM([UMHC Applebaum])+Sum([UMHC BPEI])+Sum([UMHC Coral Spg])+Sum([UMHC Deerfield])+Sum([UMHC Ear Institute])+Sum([UMHC Hollywood])+Sum([UMHC IR Clinic])+Sum([UMHC Kendall])+Sum([UMHC LFMC])+Sum([UMHC Marlin Park])+Sum([UMHC Pain Clinic])+Sum([UMHC Plantation])+Sum([UMHC Radiology])+Sum([UMHC Safie])+Sum([UMHC SCCC]))

/

((Count([UHealth Tower])+Count([UMHC Applebaum])+Count([UMHC BPEI])+Count([UMHC Coral Spg])+Count([UMHC Deerfield])+Count([UMHC Ear Institute])+Count([UMHC Hollywood])+Count([UMHC IR Clinic])+Count([UMHC Kendall])+Count([UMHC LFMC])+Count([UMHC Marlin Park])+Count([UMHC Pain Clinic])+Count([UMHC Plantation])+Count([UMHC Radiology])+Count([UMHC Safie])+Count([UMHC SCCC]))/3)

View solution in original post

11 Replies
sunny_talwar

Try this

(

Count([UHealth Tower])+Count([UMHC Applebaum])+Count([UMHC BPEI])+Count([UMHC Coral Spg])+Count([UMHC Deerfield])+Count([UMHC Ear Institute])+Count([UMHC Hollywood])+Count([UMHC IR Clinic])+Count([UMHC Kendall])+Count([UMHC LFMC])+Count([UMHC Marlin Park])+Count([UMHC Pain Clinic])+Count([UMHC Plantation])+Count([UMHC Radiology])+Count([UMHC Safie])+Count([UMHC SCCC])

)

/

(

SUM([UHealth Tower])+SUM([UMHC Applebaum])+Sum([UMHC BPEI])+Sum([UMHC Coral Spg])+Sum([UMHC Deerfield])+Sum([UMHC Ear Institute])+Sum([UMHC Hollywood])+Sum([UMHC IR Clinic])+Sum([UMHC Kendall])+Sum([UMHC LFMC])+Sum([UMHC Marlin Park])+Sum([UMHC Pain Clinic])+Sum([UMHC Plantation])+Sum([UMHC Radiology])+Sum([UMHC Safie])+Sum([UMHC SCCC]) /3

)

hammermill21
Creator III
Creator III
Author

So that works better! But the total is wrong, I get 52% when it should be 67%.

sunny_talwar

Not sure... may be share a sample

hammermill21
Creator III
Creator III
Author

Here is my app.

So what I am trying to calculate is the 32 (total sum of row) / 16 (number of facilities) / 3 (highest possible score)

Thank you Sunny!

sunny_talwar

Try this

(SUM([UHealth Tower])+SUM([UMHC Applebaum])+Sum([UMHC BPEI])+Sum([UMHC Coral Spg])+Sum([UMHC Deerfield])+Sum([UMHC Ear Institute])+Sum([UMHC Hollywood])+Sum([UMHC IR Clinic])+Sum([UMHC Kendall])+Sum([UMHC LFMC])+Sum([UMHC Marlin Park])+Sum([UMHC Pain Clinic])+Sum([UMHC Plantation])+Sum([UMHC Radiology])+Sum([UMHC Safie])+Sum([UMHC SCCC]))

/

((Count([UHealth Tower])+Count([UMHC Applebaum])+Count([UMHC BPEI])+Count([UMHC Coral Spg])+Count([UMHC Deerfield])+Count([UMHC Ear Institute])+Count([UMHC Hollywood])+Count([UMHC IR Clinic])+Count([UMHC Kendall])+Count([UMHC LFMC])+Count([UMHC Marlin Park])+Count([UMHC Pain Clinic])+Count([UMHC Plantation])+Count([UMHC Radiology])+Count([UMHC Safie])+Count([UMHC SCCC]))/3)

hammermill21
Creator III
Creator III
Author

Honestly... you are the best!

Thank you!!!!!

hammermill21
Creator III
Creator III
Author

Sunny,

If I can ask you another question. My rows have duplicates that with the same total so, therefore, they are being removed from my table.

How can I fix that? I read that it is common but not how to fix it. It's on the same table I was working on.

sunny_talwar

If I can ask you another question. My rows have duplicates that with the same total so, therefore, they are being removed from my table.

Getting removed while reload or is this in the chart itself?

hammermill21
Creator III
Creator III
Author

In the chart itself. But if I do a Count([EC STANDARD]) it will show me I have 8, but on the chart, I only see 3 because the other few have the same totals.