Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
data_guru_001
Contributor III
Contributor III

Count "values" of set expression, in range of two values

Hello,

Please see the below expression I have calculated:

=

num(

(sum(Rolling13Sum)*WEEK)

/sum(Rolling13Sum),'##.0')

 

From this expression, I am trying to create a chart that shows how many values are associated to a categorized range of numbers. The dimension it should be calculated against is PRODUCT.

So, for example

1-6WKS = 876

6-7WKS = 987

8-15WKS = 621

 

I'm figuring that I would need to use the Count function, but am having difficulty in doing so. 

This is what I am trying:

Count({$<

num(

(sum(Rolling13Sum)*WEEK)

/sum(Rolling13Sum),'##.0')

= {'>1<6'}>} PRODUCT)

 

This however, will not portray any data. Can I not use a set expression after Count?

Thanks in advance!

Labels (1)
2 Replies
Anil_Babu_Samineni

Perhaps this?

Count({<PRODUCT={">1<6"}>} Aggr(num((sum(Rolling13Sum)*WEEK)/sum(Rolling13Sum)),'##.0'), Product))

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
data_guru_001
Contributor III
Contributor III
Author

Hi,

Thanks for the response. Unfortunately, it keeps saying there is an "Error in Expression". 

It is highlighting the end: , Product))

I think it is a simple syntax error, but I'm having trouble getting it to read it.

Thanks