Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Compare values from the same field for different months

I have the following fields in my QV.

Load

Apps,

Users,

Month

from...

I need to compare values in the Users field for each month and show them.

For example, if I select Mar as my month, I need to the number of users that are present both in Mar and other months respectively (Common Users).

8 Replies
Highlighted

Re: Compare values from the same field for different months

Perhaps this?

Count({<Month = P(Month), Users = P({<Month = {$(=Max(Month))}>} Users)>} Users)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator II
Creator II

Re: Compare values from the same field for different months

Returning 0s

Highlighted

Re: Compare values from the same field for different months

May be i misplaced wrong. Can you explain with data set?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator II
Creator II

Re: Compare values from the same field for different months

Apps          User         Month  

ABC            A1               Jan

ABC            A1               Feb

ABC            B1               Feb

ABC            B1               March

If I select Jan in my List box, the count of Users for Feb should be 1 and March 0 as only one user is present in Feb, which is also present in Jan and 0 users are present in March from Jan. Similarly, for all months, I need the same type of result, based on the selected month.

Highlighted
Creator II
Creator II

Re: Compare values from the same field for different months

stalwar1

Any idea?

Highlighted

Re: Compare values from the same field for different months

May be this

Count(DISTINCT {<Month, User = p(User)>} Users)

Highlighted
Creator II
Creator II

Re: Compare values from the same field for different months

This expression returns all the Users present for the selected month.

If I pick Mar, it should return the no. of Users present in

(Mar and Apr)

(Mar and May)

(Mar and Jun)

.

.

(Mar and Dec)

Similarly, if I pick Apr, it should present the no. of Users in

(Apr and May)

(Apr and Jun)

.

.

(Apr and Dec)

***Common Users present in the selected month and the respective following months

Highlighted

Re: Compare values from the same field for different months

Would you be able to share a sample so that we can take a look at it