Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor II
Contributor II

Nesting year into a formula

I'd like to create the measure below specific to a year, such as 2017. I'm not certain how to add this to my current formula that is pulling only customers that purchased 2 products together.

Sum({$<CustomerName = {"=Count(DISTINCT {<Product = {'1016', '1020'}>} Product) = 2"}>} Qty)

1 Solution

Accepted Solutions
Highlighted

May be one of these

Sum({$<CustomerName = {"=Count(DISTINCT {<Product = {'1016', '1020'}, Year  = {'2017'}>} Product) = 2"}, Year  = {'2017'}>} Qty)

or this

Sum({$<CustomerName = {"=Count(DISTINCT {<Product = {'1016', '1020'}, Year  = {'2017'}>} Product) = 2"}>} Qty)

View solution in original post

2 Replies
Highlighted

May be one of these

Sum({$<CustomerName = {"=Count(DISTINCT {<Product = {'1016', '1020'}, Year  = {'2017'}>} Product) = 2"}, Year  = {'2017'}>} Qty)

or this

Sum({$<CustomerName = {"=Count(DISTINCT {<Product = {'1016', '1020'}, Year  = {'2017'}>} Product) = 2"}>} Qty)

View solution in original post

Highlighted
Contributor II
Contributor II

Thanks. That was easier than I thought!