Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pnutbutta
New 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

Re: Nesting year into a formula

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)

2 Replies

Re: Nesting year into a formula

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)

pnutbutta
New Contributor II

Re: Nesting year into a formula

Thanks. That was easier than I thought!

Community Browser