Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
ronman10
Creator
Creator

Count of items lying in each quadrant in a scatter plot

Hi Guys,

 

I have created a scatter plot based on Stores and the sales by the each store. I would like to know the count of stores that lie in each quadrant. Is this possible? Please let me know.

Best Regards,

Rony

17 Replies
ronman10
Creator
Creator
Author

Nope. Error in set modifier expression

anseglko
Creator
Creator

What is your dimension name? Store? Stores? 

ronman10
Creator
Creator
Author

Dimension name is Location.

anseglko
Creator
Creator

My bad, it was missing couple parentheses

 

Count({<Location=
{"=(((avg({$<Year={'2019'}>}ASP))/(avg({$<Year={'2018'}>}ASP)))-1)<=0"}
>*<Location=
{"=(((avg({$<Year={'2019'}>}Volume))/(avg({$<Year={'2018'}>}Volume)))-1)<=0"}>}
distinct Location)

 

What about now?

ronman10
Creator
Creator
Author

Hi Anseg,

 

The expression is working fine. However, the count is coming as 0. Not sure why.

 

Rony

 

 

ronman10
Creator
Creator
Author

Hi Anseg,

 

Below is the expression I am using right now. I have expanded the ASP formula as the one I was using earlier was wrong.The expression is correct. However, the count is still not showing. Where am I going wrong? Please advise

Also attached is a screenshot of the expression page

Count({<Location= {"=$(=((Sum({$<Year={"2019"}>}Value)/Sum({$<Year={"2019"}>}Volume))/
(Sum({$<Year={"2018"}>}Value)/Sum({$<Year={"2018"}>}Volume))-1))
<=0"}>*<Location= {"=$(=(Sum({$<Year={"2019"}>}Volume)/Sum({$<Year={"2018"}>}Volume)-1))<=0"}>} distinct Location)

 

Rony

anseglko
Creator
Creator

Okay my bad again, in my original reply I had the $(= but they shouldn't be there so you can remove them

Count({<Location= 
{"=((Sum({$<Year={'2019'}>}Value)/Sum({$<Year={'2019'}>}Volume))/(Sum({$<Year={'2018'}>}Value)/Sum({$<Year={'2018'}>}Volume))-1)<=0"}
>*<Location= 
{"=(Sum({$<Year={'2019'}>}Volume)/Sum({$<Year={'2018'}>}Volume)-1)<=0"}>} 
distinct Location)

How is this? 

ronman10
Creator
Creator
Author

This is perfect. Thanks a lot Anseg!!😊

 

Best Regards,

Rony