

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set Analysis with Count
Hello
Hope someone can help please.
I have a table that has part numbers and for each part number it has the total stock available, e.g.
PartNumber, Stock
100001,200
100002,150
100003,320
etc.
In Qlik Sense I want to create a number of text boxes that show various counts. They are all very similar and show the number of parts that have a stock count between one value and another. E.g. the number of parts that have a stock count between 100 and 200.
So far I have this,
=count({<PartNumber = {"=sum(Stock) >100"} >} distinct PartNumber)
which counts the number of parts with stock over 100.
But how do I change this to say >100 and < 200? Or is there another way to achieve the same thing?
Thanks.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try like below
=count({$<Stock = {">100<200"}>} distinct PartNumber)
to show in text with custom string value like below
='# of parts stock count between 100 & 200 is :'& chr(10)& count({$<Stock = {">100<200"}>} distinct PartNumber)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try like below
=count({$<Stock = {">100<200"}>} distinct PartNumber)
to show in text with custom string value like below
='# of parts stock count between 100 & 200 is :'& chr(10)& count({$<Stock = {">100<200"}>} distinct PartNumber)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
=Count({<PartNumber = {"=Sum(Stock) >100 and Sum(Stock) < 200"}>} distinct PartNumber)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! That has worked fine.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you but unfortunately that has not worked. It returns zero.
