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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
hammermill21
Creator III
Creator III

Calculating Percentages

Hello,

I am trying to get the percentages of pending items.

so I have an inventory count of 36, 0 pending so it'a 0% pending, but for some reason, I'm not always getting the right totals. This is what I have tried:

=Count({1}DISTINCT BarcodeI) / (Count({1}DISTINCT BarcodeI)) - (Count(DISTINCT{<Pass= {'YES'}, Barcode>} Barcode) )/100

I must be missing something in my expression.

Thank you!

12 Replies
hammermill21
Creator III
Creator III
Author

Hey SUnny!

Yes that works but I had to add /100 to the end:

=(Count({1}DISTINCT BarcodeI) - Count(DISTINCT{<Pass= {'YES'}, Barcode>} Barcode))/Count({1}DISTINCT BarcodeI) * 100/100

sunny_talwar
MVP
MVP

Oh, then why don't you just use this?

=(Count({1}DISTINCT BarcodeI) - Count(DISTINCT{<Pass= {'YES'}, Barcode>} Barcode))/Count({1}DISTINCT BarcodeI)

hammermill21
Creator III
Creator III
Author

Sunny, Perfect!!!