# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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)

Tags (1)
1 Solution

Accepted Solutions
MVP

## 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
MVP

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

New Contributor II

## Re: Nesting year into a formula

Thanks. That was easier than I thought!