Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
adnan_rafiq
Partner - Creator II
Partner - Creator II

Set analysis expression issues

Hi All Experts    

Just wanted an idea on how to do this in set analysis.

i have a data of products some have USD and some have AUD in their Invoice Value. The USDtoAUD(vL.USDRate)rate is taken from user on front end.

What I want is, to be able to count the products whose converted price to AUD is greater than 100 and less than 1000.

The only issue is I am converting the price on front end. So i am making something of this sort which the expression editor shows errors on:

I am trying to convert the invoice price in set analysis.(red marked)

Count(

{<Invoice_Value/$(vL.USDRate)={'>=100<=1000'}

,Invoice_Currency={"USD"}>}

Prod_ID )

All help appreciated

1 Solution

Accepted Solutions
sunny_talwar

Would you be able to share a sample with expected output?

View solution in original post

8 Replies
sunny_talwar

May be this:

Count({<Prod_ID = {"=Invoice_Value/$(vL.USDRate) >=100 and Invoice_Value/$(vL.USDRate) <= 1000"}, Invoice_Currency = {'USD'}>} Prod_ID)

adnan_rafiq
Partner - Creator II
Partner - Creator II
Author

Prod_ID is not the number that is being converted, here

the Prod_ID for those products need to be counted where, this expression :

Invoice_Value/$(vL.USDRate)  is >=100 and <=1000

sunny_talwar

I am just using the search string against Prod_ID. Have you given it a try?

adnan_rafiq
Partner - Creator II
Partner - Creator II
Author

Count({<Prod_ID = {"=Invoice_Value/$(vL.USDRate) >=100 and Invoice_Value/$(vL.USDRate) <= 1000"}, Invoice_Currency = {'USD'}>} Prod_ID)



this is returning 0.

As it should because Prod_ID has values like Prod A, Prod B etc not 123

sunny_talwar

Look here for the syntax of search string from A Primer on Set Analysis

Capture.PNG

That is besides the point. Would you be able to tell me on what dimension are you checking =Invoice_Value/$(vL.USDRate) >=100 and Invoice_Value/$(vL.USDRate)<= 1000 against??

adnan_rafiq
Partner - Creator II
Partner - Creator II
Author

That is the thing


Invoice_Value/$(vL.USDRate)


has to become the dimenssion and be judged against upper(1000) and lower(100) limits

sunny_talwar

Would you be able to share a sample with expected output?

adnan_rafiq
Partner - Creator II
Partner - Creator II
Author

I think you are right sunny

Thanks

So how does this start as a search string?