Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
snehamahaveer
Creator
Creator

Calculating possible values

Hi All,

I've been trying to solve this mystery for a while now.

I have a list of customers with their proposed Discount code and their discount codes used at transaction. So my end goal is to find the number of customers by month who have been using the proposed discount code (among multiple transaction discount codes if used).

sum(aggr(if(ProposedDiscCode= Concat(DISTINCT Transaction_Discount_Code, ','),1,0),Customer,Month,Store))

The above formula helps me identify the number but when the customer uses only the proposed discount code and none others.

CustomerProposedDiscCodeTransaction_Discount_Code
AdamIGIG,IH,IL
SnehaIHIH
TimIGIG
JoeIFIF,IG,IY

So my formula for the above table of values gives the count as 2, whereas I want 4.

Can you please help me with this.

Thanks in advance,

S

10 Replies
sunny_talwar

All this is doing is to distinct count customers where Transaction_Discount_Code = ProposedDiscCode