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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
sona_sa
Creator II
Creator II

Expression Logic

Hi Team,

I have a scenario, My current expression is below:

if(GetFieldSelections(Options1)='Millions', if(GetFieldSelections(Options2)='No', sum({<account={'EX'},Date={'$(=vTime1)'}>}non_pti)/1000000, sum({<account={'EX'},Date={'$(=vTime1)'}>}non _pti_cc)/1000000)

Now I want to add another if condition where a dimension is Options3 --> 1M$, 2M$ and 3M$.

  1. If User select 1M$, Then from the current expression >1M$ amount of record should to select Else the Current Expression as it is.
  2. If User select 2M$, Then from the current expression >2M$ amount of record should to select Else the Current Expression as it is.
  3. If User select 3M$, Then from the current expression >3M$ amount of record should to select Else the Current Expression as it is.

Now How and where I can put my third option in this expression.

Please help me on the same.

Regards,

AK

Labels (1)
2 Replies
tresesco
MVP
MVP

If your data model is connected, you would not require anything extra to this expression; it should work as you expected. If it is not working so, try to share a sample app so that we can have a look and suggest you accordingly. 

sona_sa
Creator II
Creator II
Author

Hi Tresesco,
My Data model is ok. I am using Option1 and Option 2 in the same expression, Now I have to add one condition (Options3) in my current expression for selection of 1M$, 2M$ and 3M$. It is nothing but Symmetrical Difference of 1000000, 2000000, and 3000000.

I have scripted and created a dimension in script:
Options3:
Load * Inline [
Options3
1M$
2M$
3M$];

Now I want to write an expression for this Options3:
1. If User select 1M$, Then from the current expression >1M$ amount of record should to select Else the Current Expression as it is.
2. If User select 2M$, Then from the current expression >2M$ amount of record should to select Else the Current Expression as it is.
3. If User select 2M$, Then from the current expression >2M$ amount of record should to select Else the Current Expression as it is.
Current Expression:
if(GetFieldSelections(Options1)='Millions', if(GetFieldSelections(Options2)='No', sum({<account={'EX'},Date={'$(=vTime1)'}>}non_pti)/1000000, sum({<account={'EX'},Date={'$(=vTime1)'}>}non _pti_cc)/1000000)

Now How and where I can put my third option in this expression. So it will work.
Sorry in I am unable to attached any QVF, Due to some restrictions.

Please help me on the same.

Regards,
AK