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: 
Kuravisma
Contributor
Contributor

Divide found values

Hello,

I have the following relevant columns:
Discount code
Name
Vouchers Total

I want to get in a table the school name "name" and associated a percentage of the number of relevant DiscountCodes divided by Vouchers Total. The number of discount codes is calculated as here: https://community.qlik.com/t5/New-to-Qlik-Sense/Count-text-with-specific-values/td-p/2057922

For this I tried the following formula:
=(Count({$<discountCode={"*GAUF*"}>} discountCode))/(Sum({<name={"=Match('Glückauf-Gymnasium Dippoldiswalde/ Altenberg', Name)"}>} [total vouchers]))

But instead of 75% the number 85% comes out.

Can anyone of you help?

Best regards
Hendrik

Translated with www.DeepL.com/Translator (free version)

Labels (1)
1 Reply
BrunPierre
Partner - Master II
Partner - Master II

I believe the right way would be this.

Sum({<Name={"=Match(Name,'Glückauf-Gymnasium Dippoldiswalde/ Altenberg')"}>} [total vouchers])

or simply so this.

Sum({<Name={'Glückauf-Gymnasium Dippoldiswalde/ Altenberg'}>} [total vouchers])