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

Announcements
Congratulations to the new Qlik Luminary and Partner Ambassador class! Meet them here
cancel
Showing results for 
Search instead for 
Did you mean: 
carolin01
Partner - Creator II
Partner - Creator II

Expression in chart


Hi,

could anybody help me with this:

sum({$<FYear = {$(vChooseYear1)}, OrderPhase_Desc = {$(vOrderPhaseDesc)}>}SoldToBusinessPartnerCount)

I´m trying to count the number of buying customers for a specific year. The field SoldToBusinessPartnerCount contains 1 for each sales position line. I think sum distinct is correct but for some reason I can´t get this working. Is it possible?

Best regards,

Carolin

Labels (1)
10 Replies
Nicole-Smith
MVP
MVP

You want to count the distinct Customer, not the distinct count of Customer (you were counting the zeroes and ones, when you should be counting the Customers themselves):


sum(aggr(count({$<FYear = {$(vChooseYear1)}, OrderPhase_Desc = {$(vOrderPhaseDesc)}, SoldToBusinessPartnerCount = {1}>} distinct SoldToBusinessPartner), SoldToBusinessPartner))