Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression error


Hi!

Can you maybe help me to correct this expression pls?

=count(DISTINCT(count(distinct{$<Year ={2010}, Month =
{'11','12'}>}
Name)+count(distinct{$<Year ={2011}, Month = {'1','2','3'}>} Name)))

I want to count the number of the names from 11/2010 to 3/2011. But I dont know how to write this expression without count  two times the same name in this period.

Any suggestions greatly appreciated.

Andrea

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this:

=count( {$<Year ={2010}, Month ={'11','12'}>+<Year ={2011}, Month = {'1','2','3'}>} Name)


Or select the range on a YearMonth field, maybe with a search expression like

=count( {$<YearMonth= {">=201011<=201103"}>} Name)


View solution in original post

2 Replies
swuehl
MVP
MVP

Maybe like this:

=count( {$<Year ={2010}, Month ={'11','12'}>+<Year ={2011}, Month = {'1','2','3'}>} Name)


Or select the range on a YearMonth field, maybe with a search expression like

=count( {$<YearMonth= {">=201011<=201103"}>} Name)


Not applicable
Author

Thank you so much for ypur help!