# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for
Did you mean:
Highlighted
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
MVP

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

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)

Highlighted
Contributor II

Thanks. That was easier than I thought!