Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Iclarity
Contributor II
Contributor II

Greater than equal to not working in Qlik Sense

Hello, I'm new to Qlik Sense. Please someone help me!

I'm using global_superstore_2016.xlsx dataset attached below.

I am trying to find "Sales" greater than a specific "Country" in a bar chart. I have attached the dataset which I'm using for the visualization.

First I tried plotting the Country vs sum(Sales) in aBar Chart.

Dimension: Country

Measures: sum(Sales)

Country Vs  sum(Sales)Country Vs sum(Sales)

I want to show Countries having Sales greater than Country - China. I tried using the set analysis but it is not working.

Dimension: Country

Measures: sum({<Sales={">'$(sum({<Country={"China"}>}Sales))'"}>}Sales)

Country vs Sales (using sum({<Sales={">'$(sum({<Country={"China"&#125;>&#125;Sales))'"&#125;>&#125;Sales)Country vs Sales (using sum({<Sales={">'$(sum({<Country={"China"}>}Sales))'"}>}Sales)

I even tried to manually put the value to check:

Measures: sum({<Sales={">700562.03"}>}Sales)

since value of sum({<Country={"China"}>}Sales) in KPI was show 700562.03.

image.png

The output should be a bar chart of Country vs Sales, where in the dimension Country, it should contain 3 values or 3 bars as there are 3 countries having Sales greater than Country-China, i.e United States, Australia & France. However, it is not showing.

Please someone help me!

2 Solutions

Accepted Solutions
Iclarity
Contributor II
Contributor II
Author

Thanks Shivesh, nice alternative method.

But actually I'm doing python integration in Qlik Sense. And so I'm trying to filter it within Dimension or Measures input section itself by set analysis.

 I need a set analysis solution which can be directly put in the Dimension or Measures itself. 

Someone please help me to find the way. I really need the deliver it to the client. Please help me!

View solution in original post

sunny_talwar

May be try this

Sum({<Country = {"=Sum(Sales) > Sum(TOTAL {<Country = {'China'}>} Sales)"}>} Sales)

View solution in original post

7 Replies
shiveshsingh
Master
Master

Hi

 

Create one variable, vChina = sum({<Country = {'China'}>}Sales)

Now, in Limitation field, select exact value, and then put =$(vChina) in value box.

Expression --> Sum(Sales)

Dimension -->Country

 

Capture.PNG

 

 

Iclarity
Contributor II
Contributor II
Author

Thanks Shivesh, nice alternative method.

But actually I'm doing python integration in Qlik Sense. And so I'm trying to filter it within Dimension or Measures input section itself by set analysis.

 I need a set analysis solution which can be directly put in the Dimension or Measures itself. 

Someone please help me to find the way. I really need the deliver it to the client. Please help me!

sunny_talwar

May be try this

Sum({<Country = {"=Sum(Sales) > Sum(TOTAL {<Country = {'China'}>} Sales)"}>} Sales)
Iclarity
Contributor II
Contributor II
Author

Thank you! Thank you! Thank you! Thank you sooo.... much SUNNY !

Finally it worked! I really left the hope that I could do that or it is possible in Qlik Sense. As I tried all the alternatives as per my understanding & by spending so much time by trying in different ways, searching for help,  asking others, and after getting no hope, I assumed that it won't be possible in Qlik Sense, as set analysis can't be applied directly on Dimensions.

I thought I won't be able to deliver it to the Client next day, and I will miss the deadline. But then the rise of hope, thanks to Qlik Community and thank you much once again Sunny ! It really helped me a lot. I can say you just helped to find the missing gear of a very powerful machine . 

THANK YOU SUNNY! 

 

sunny_talwar

Always happy to help 🙂

shiveshsingh
Master
Master

ah, I was not able to check yesterday 😞 , anyways you got the expression.

 

Cheers!

shiveshsingh
Master
Master

ah, I was not able to check yesterday  , anyways you got the expression.

 

Cheers!