Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Creator
Creator

Nope. Error in set modifier expression

Highlighted
Creator
Creator

What is your dimension name? Store? Stores? 

Highlighted
Creator
Creator

Dimension name is Location.

Highlighted
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?

Highlighted
Creator
Creator

Hi Anseg,

 

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

 

Rony

 

 

Highlighted
Creator
Creator

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

Highlighted
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? 

View solution in original post

Highlighted
Creator
Creator

This is perfect. Thanks a lot Anseg!!😊

 

Best Regards,

Rony