Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
gwenngannon
Contributor II
Contributor II

Set Analysis Greater than less than a Variable

Hi, I'm trying to use  the following but am not getting a result: I've seen many posts on variables, greater than and equal to and have seen a few different iterations: this is what I ended up with and it is not working.

Any ideas on what part of the expression is incorrect

Please

=SUM({< EFF_DATE ={"<=$(=vMaxTransactionDate)"} , EFF_DATE = {">=$(=vMinTransactionDate)"} ,
[TXN_AMOUNT] = {">=$(=vTXNSum)"} >} TXN_AMOUNT)

1 Solution

Accepted Solutions
sunny_talwar

May be try like this:

=Sum({<EFF_DATE ={"<=$(=vMaxTransactionDate)>=$(=vMinTransactionDate)"}, [TXN_AMOUNT] = {">=$(=vTXNSum)"}>} TXN_AMOUNT)

View solution in original post

6 Replies
sunny_talwar

May be try like this:

=Sum({<EFF_DATE ={"<=$(=vMaxTransactionDate)>=$(=vMinTransactionDate)"}, [TXN_AMOUNT] = {">=$(=vTXNSum)"}>} TXN_AMOUNT)

gwenngannon
Contributor II
Contributor II
Author

Thank you, I'm checking on the expression now, I also want to add Fabs in the set analysis but am having troubles with that also-   can you assist with that also ?

Sum({<EFF_DATE ={"<=$(=vMaxTransactionDate)>=$(=vMinTransactionDate)"}, [TXN_AMOUNT] =

{"=fabs(TXN_AMOUNT)"} = ">=$(=vTXNSum)"}>} TXN_AMOUNT)

sunny_talwar

May be this:

Sum({<EFF_DATE ={"<=$(=vMaxTransactionDate)>=$(=vMinTransactionDate)"}, [TXN_AMOUNT] = {"=fabs(TXN_AMOUNT) >= vTXNSum"}>} TXN_AMOUNT)

gwenngannon
Contributor II
Contributor II
Author

Sunny T ,

This is great thank you- I am still having troubles, although I agree this looks correct

when I break the expression up in an if it works but converting to Set analysis does not give me results

I am looking into the possibility of dates HH MM SS not working well in Set Analysis when using variables for Dates without HH MM SS??? not sure if anyone has ever run into this problem

sunny_talwar

I am not sure what you have behind those variables, but a good place to start would be here:

Dates in Set Analysis

gwenngannon
Contributor II
Contributor II
Author

Everything worked perfectly once I adjusted the date format- thanks for your help