Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Grouping Data and Counting.

I am new to Qlikview. I am trying to accomplish the following.

I have about 25,000 users and their monthly spending. I have grouped then as following

I have created a List box with Month.I have one char which displays Month wise total number of usesr who uses credit card.

Month_Users.PNG

For the above char I used the following: Dimension: YYMONTH

Experession Count (DISTINCT USER_ID)

Now I want to group them

I have a field called CHARGED_AMOUNT

Count number of users who spent <1000

Count number of Users who spent 1000-4999

Count number of users who spent 5000-9999

Count number of users who spent 10000-19999

Count number of users who spent >20000

How do I count?

Thank you

1 Solution

Accepted Solutions
Not applicable
Author

See the attached.  Is this what you are after?

(The bands are respective of what you have above.)

View solution in original post

7 Replies
Not applicable
Author

Hi,

Try the following expression(s):

Count ({<Amount={'<1000'}>} DISTINCT USER_ID)

Count ({<Amount={'>=1000<5000'}>} DISTINCT USER_ID) etc

Not applicable
Author

HI cchhatralia

Thanks for the reply. I did as follows

DIMENSION: CREDIT_CARD_MODEL (we have only one credit card model

Experession: Count ({<CHARGED_AMOUNT={'<1000'}>} USER_ID)

But the outcome is slightly different. It calculates number of times the user spend less then 1000. Since I have 5 months data and the user spent every month less then 1000 for the past 5 months it calculates 5.

See the image

Count_users_lessthan_100_spent.PNG

I can add additional dimension. but looks like the result I am expecting is different

I want First coulum Total number of User who spent < 1000. Remember I have a list box which contains months. We have 5 months of data. So the user may spent each month some amount. I can select YYMM from my listbox which will narrowdown on month basis.

Not applicable
Author

are you able to post a sample doc?

Not applicable
Author

Sure. Thanks I have attached a dummy data file here

kumarnatarajan
Partner - Specialist
Partner - Specialist

Hi,

You cat able to use Class() function

Ex : http://community.qlik.com/thread/65352

Else

You cat able to use Dual() function and if() Condition

EX : http://community.qlik.com/thread/4328

Else you want more details share Sample. I can help you

Not applicable
Author

See the attached.  Is this what you are after?

(The bands are respective of what you have above.)

Not applicable
Author

Thank you cchhatralia. Great Nice of you helping me..