Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Logic help needed

Hi all,

I need help on the below logic. My requirement is as below:

I have two filters : 

1. Sales Over Amount

2. Sales Under Amount

I have a table with as below:

Vehicle NoAmount ($)
ABCD1215
DEFG1316
GHTY5618
HJKU7619

 

So i created varaibles as below: 

vSalesUnderAmount

 Only({<[Transaction Date]={">=$(=$(vDateFrom)) <=$(=$(vDateTo))"},
[Transaction Month]=,[Transaction Week]=,BillingMonthNameAbbr=>}
if(GetSelectedCount([Sales Under Amount]) > 0,GetFieldSelections([Sales Under Amount]),'1000000000'))

vSalesOverAmount

Only({<[Transaction Date]={">=$(=$(vDateFrom)) <=$(=$(vDateTo))"},
[Transaction Month]=,[Transaction Week]=,BillingMonthNameAbbr=>}
if(GetSelectedCount([Sales Over Amount]) > 0,GetFieldSelections([Sales Over Amount]),'1000000000'))

The above two variables i have included in the below varaible:

vSales

Sum(
{<[Transaction Date]={">=$(=$(vDateFrom)) <=$(=$(vDateTo))"},TranDateTime={"=sum(Sales)<=$(=num($(vSalesUnderAmount)))"}>*
<[Transaction Date]={">=$(=$(vDateFrom)) <=$(=$(vDateTo))"},TranDateTime={"=sum(Sales)>=$(=num($(vSalesOverAmount)))"}>}
Sales)

My requirement is 

So when i select Sales Over Amount 15, my table should only reflect only the amount Over 15. 

when i select Sales Under Amount 15, my table should reflect only 14 amount in the table. 

if i select Sales Over Amount 15 and Sales Under Amount 18, it should reflect only 16 in the table.

Please help. 

1 Reply
Highlighted

Would you be able to share a sample where we can see this and test it out?