Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

Help counting/charting occurrences within data

Hello,

I have a transaction file with two fields: CustomerID and ItemID. Each line represents a single order/transaction, so a customer ID can show up multiple times. My thought was there would be a way to count/show the distribution of how many customers made 1 order, 2 orders, 3 orders, 4 orders, 5 orders...N orders. What I would like is a histogram/bar chart that details this (so first bar would be number of customers that made 1 order, second would be # of customers that made 2 orders, and so on). I have been playing around for a half day trying to figure it out and can't seem to get it. I'm pretty new so any help would be much appreciated!

Thanks!

Tags (2)
7 Replies
MVP & Luminary
MVP & Luminary

Re: Help counting/charting occurrences within data

You need a calculated dimension for this =aggr(count(ItemID),CustomerID). And the expression to go with that is count(distinct CustomerID).


talk is cheap, supply exceeds demand
Not applicable

Re: Help counting/charting occurrences within data

Hi Gysbert. Thanks for this. The chart almost looks perfect, however, it seems that I am missing something as it just lumps a single total into one bar? Do I have to set parameters to delineate multiple bars?

MVP & Luminary
MVP & Luminary

Re: Help counting/charting occurrences within data

You'll have to show me a qlikview document that shows what you mean. I don't see how it could do that.


talk is cheap, supply exceeds demand
Not applicable

Re: Help counting/charting occurrences within data

My bad! I put Class instead of Count. It works now Thank you!!

MVP & Luminary
MVP & Luminary

Re: Help counting/charting occurrences within data

Haha . Glad you sorted it.


talk is cheap, supply exceeds demand
Not applicable

Re: Help counting/charting occurrences within data

Hi Gysbert,

Thanks for your help. I have one follow up question. Since I now have a nice graph which shows customers by number of orders and another graph of sales volume by number of orders, I'd like to be able to slice and dice the rest of my dashboard/metrics by number of orders made. I believe I need to create a list box for the number of orders. I tried playing around with it but wasn't able to figure out how to do this. Is this possible? If so, do you know how I can do that?

Thanks again for helping a new guy out. I'm looking to take some formal training on this ASAP but for now your help is invaluable.

MVP & Luminary
MVP & Luminary

Re: Help counting/charting occurrences within data

New question, new discussion please. These two documents are worth reading too:

QlikCommunity Tip: How to get answers to your post?

Preparing examples for Upload - Reduction and Data Scrambling


talk is cheap, supply exceeds demand