Qlik Community

Community Corner

Discussion board for questions about the Qlik Community, its features, sharing information, general discussions and even some fun. This is for both new and longtime community members. Everyone is welcome!

Highlighted
Not applicable

Unique counting

I have a set of data that contains orders for multiple stores.  What I want to do is create some object (list box, chart, etc.) that tells me how many stores placed an order per month.  It doesn't matter if store A has 1 order or 100 orders, they would only count as 1 to the total number of stores ordering.  I've tried usig the count and/or aggr functions to do this but can't seem to get it to work.  I'm just trying to get the count of stores right now.  Once I had that I figured I'd add something to choose only those for that month.  I need a list box, chart, whatever for each month on the sheet.  I'd like to use the statistics box but I don't see how I can create my own formula.  I only want one line per month - "Number of Stores Ordering - Jan.", "Number of Stores Ordering - Feb.", etc.

Thanks.

Tags (3)
1 Solution

Accepted Solutions
jason_michaelid
Honored Contributor II

Unique counting

If you have a relatively standard data model then I would have thought a simple straight table chart with Month as the dimension and COUNT(DISTINCT StoreID) as the expression would do the trick as stores and dates would only be associated through the Orders fact table.

Is this the case in your model?

Hope this helps,

Jason

2 Replies
jason_michaelid
Honored Contributor II

Unique counting

If you have a relatively standard data model then I would have thought a simple straight table chart with Month as the dimension and COUNT(DISTINCT StoreID) as the expression would do the trick as stores and dates would only be associated through the Orders fact table.

Is this the case in your model?

Hope this helps,

Jason

Not applicable

Unique counting

Again I could have sworn I tried that but once I follow your example it works.  Thanks.