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

Announcements
Register by January 31 for $300 off your Qlik Connect pass: Register Now!
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

10 Replies
Nicole-Smith

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))