Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Alternate State in Set Analysis

Hi,

I have a table:

  

YearMonthInvoice Number
2001Jan1
2001Feb2
2001Mar3
2001Apr4
2002Feb5
2002Mar6
2002June7
2002May8
2003June9
2003July10
2003Aug11
2003Sep12
2003Feb

13

And I have the following expression in a Text box:

=Count({<Year={'2001'}>+<Month={'Feb'}>}DISTINCT [Invoice Number])

I thought the value would be 4+3=7 because Feb occurs 3 times. But the result is 6 (4+2). Why the expression ignores the Feb month in the year 2001? What is the logic behind that?

Thanks

3 Replies
sunny_talwar

May be this for double counting where Year = 2001 and Month = Feb. For double counting that row, you can do like this:

RangeSum(Count({<Year={'2001'}>}DISTINCT [Invoice Number]),

                 Count({<Month={'Feb'}>}DISTINCT [Invoice Number]))

Anonymous
Not applicable
Author

Thanks Sunny for your reply. I got it

sunny_talwar

Awesome, if my response helped you get to what you wanted help with, then mark it as correct response, or if it was something else that helped you please provide the details of what did help as it might help some one else in the future as well.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny