Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator III
Creator III

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
Anil_Babu_Samineni

Perhaps this?

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikwiz123
Creator III
Creator III
Author

Returning 0s

Anil_Babu_Samineni

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qlikwiz123
Creator III
Creator III
Author

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.

qlikwiz123
Creator III
Creator III
Author

stalwar1

Any idea?

sunny_talwar

May be this

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

qlikwiz123
Creator III
Creator III
Author

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

sunny_talwar

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