Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I have doubts:
I have a dimension and created it in Qlik Load Script:
Millions_Option:
Load * Inline [
Text, Value
1 Millions, 1000000
2Millions, 2000000
3Millions, 3000000
];
Now I have to created an User base selection for 1 Million and 2 Millions.... When User will select 1 Million, The record will filter >1000000 or When User will select 2 Million, The record will filter >2000000 or When User will select 3 Million, The record will filter >3000000
This is my 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)
Please look into the same.
Regards,
AK
Why not simply use a set analysis for it?
While selecting one of the options, just use something like this:
sum
(
{<
Text,
Value={">=$(=only(Value))"}
>}
Value
)
This gets only the values greater than the selection:
Hi Felipedl,
Thanks for quick response. Only one doubts : Here is my 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)]
As per your suggestion : Where I can add the [sum({<Text,Value={">=$(=only(Value))"}>}Value)], So I can get the value for non_pti and non _pti_cc in below expression. Because Value is division to convert the whole number to 1M, 2M and 3M. I am calculating the filed non_pti / Value and non_pti_cc / Value to conversion of 1M, 2M and 3M
[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)
Regards,
AK
Hard to tell why this is needed [if(GetFieldSelections(Options1)='Millions', if(GetFieldSelections(Options2)='No',
You'd have to use the expression, something like:
sum({<account={'EX'},Date={'$(=vTime1)'},Text,Value={">=$(=only(Value))"}>}non_pti)/1000000
That would exclude the selection on the Text field and use the Value greater than the selected Value (in my example 2.000.000) on the expression.
Can't see the actual data to say it'll work, but the set analysis would have to be something like the above.
Thanks Felipedl,
I am explaining why I am using two if condition, I have 2 List Box in my App. 1st one is for Million(1.23) and Full Value (With Decimal Points --> 1000000.523) and 2nd is for Some Condition Yes or No.
Now I have to implement 3rd option that is 1M, 2M and 3M. So Once user will select the 1M = Data will select from the record the Non_Pti/1M and Non_Pti_cc/M which is >1M.
So that expression is like that : if(GetFieldSelections(Options1)='Millions', if(GetFieldSelections(Options2)='No', sum({<account={'EX'},Date={'$(=vTime1)'}>}non_pti)/1M, sum({<account={'EX'},Date={'$(=vTime1)'}>}non _pti_cc)/1M)
So I have to put the 3rd Option in the same expression, So Option 1 and Option 2 will work as it is and If there is any selection will done for Option 3, Then It will work for > than 1M, 2M and 3M.
So I stuck in this.
So that I am trying to make 3 option the the same expression, So It will work as is explained.
Hope you got my scenerio.
If you can make an expression for the same, So I can implement the same.
Thanks in Advance.
AK.