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

Expression with Some Selection

Hi Team,

I have a straight table where 1 dimension and 3 Expression available.

First and second Expression --> User is selection From Date and To Date (After selection From Date) First Expression Column is Filling with Some Value and for same for Second Expression with To Date --> Value is filling

Third Expression --> It is Difference of 1st and 2nd Expression. (8 - 3 = 5)

Now I want to provide List box (1 M$, 2 M$ and 3 M$) --> If User select 1 M$, The third expression should be filter out where More then 1 M$ Difference Value is available, that value should to display in the straight table.

Can any one suggest it by scrip or example.

Regards,
AK

4 Replies
JordyWegman
Partner - Master
Partner - Master

Hi,

There is no possibility to filter on this outcome because you can't filter on measures.

What you can do is define this in your script. Then add this as a dimension in your list box and make the selections.

Jordy

Climber

Work smarter, not harder
kaanerisen
Creator III
Creator III

Hi Akumar_c,

If I get it correctly, you can do that by using set analysis or limitation option for field on chart properties.

Untitled.pngUntitled1.png If you have other dimensions should be considered, you should write your own expressions with set analysis on that logic.

Hope it helps

sona_sa
Creator II
Creator II
Author

Hi Kaanerisen,

Thanks for help. I used the same, Below is my code - Working properly. Below is my my code - But it is not good practice, Can u modify this expression. 

if(GetFieldSelections(Options1)='Millions', sum({<account={'EX'},Date={'$(=vTime1)'}>}a_expenses)/1000000, sum({<account={'EX'},Date={'$(=vTime1)'}>}a_expenses))),

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),

if(GetFieldSelections(Options2)='No', sum({<account={'EX'},Date={'$(=vTime1)'}>}non), sum({<account={'EXPSENSE_TYPE'},Date={'$(=vTime1)'}>}non_ex_cc))),

if(GetFieldSelections(Options2)='No', sum({<account = {'EX'},Date={'$(=vTime1)'}>}t_p), sum({<account = {'EX'},Date={'$(=vTime1)'}>}t_p_ex_cc))),

If (GetFieldSelections(Options1)='Millions', Sum({<account={'EX'},Date={'$(=vTime1)'}>}o_expenses)/1000000,  Sum({<account={'EX'},Date={'$(=vTime1)'}>}o_expenses))

Thanks

AK

sona_sa
Creator II
Creator II
Author

Hi Kaanerisen,

Thanks for help. I used the same, Below is my code - Working properly. Below is my my code - But it is not good practice, Can u modify this expression. 

if(GetFieldSelections(Options1)='Millions', sum({<account={'EX'},Date={'$(=vTime1)'}>}a_expenses)/1000000, sum({<account={'EX'},Date={'$(=vTime1)'}>}a_expenses))),

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),

if(GetFieldSelections(Options2)='No', sum({<account={'EX'},Date={'$(=vTime1)'}>}non), sum({<account={'EXPSENSE_TYPE'},Date={'$(=vTime1)'}>}non_ex_cc))),

if(GetFieldSelections(Options2)='No', sum({<account = {'EX'},Date={'$(=vTime1)'}>}t_p), sum({<account = {'EX'},Date={'$(=vTime1)'}>}t_p_ex_cc))),

If (GetFieldSelections(Options1)='Millions', Sum({<account={'EX'},Date={'$(=vTime1)'}>}o_expenses)/1000000,  Sum({<account={'EX'},Date={'$(=vTime1)'}>}o_expenses))

Thanks

AK