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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

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
Champion III
Champion III

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!