Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
Below is a code : I want to modify the code in simple way, Can any one help me on this :
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
Can anyone help me on this. Or I should to close this post ? Reason after that again I have to add more condition on the same. Like If Amount is >1M, Then Show me Amount.
Regards,
AK
It's times like this I'm disappointed we can only give a single "like" @Vegar . I would give you triple likes for this response if I could 🙂
-Rob
Hi Vegar,
Thanks for reply. But here in the script:
Options1:
Load * Inline [
Options1
Millions
Full value];
Options2:
Load * Inline [
Options2
Yes
No];
Options3:
Load * Inline [
Options3
‘1M$’
‘2M$’
‘3M$’];
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)
Now I have to use options3 where user can select 1M$, so > 1M$ records should to select, If User Select 2M$ then >2M$ records should to select or if 3M$ then >3M$ records.
So Can anyone help me on this.
Lots of advance thanks.
Regards,
AK
Before you start to expand your expression with a third clause, you need to make sure your current expression is correct.
You have paranthesis issues with your expression. (your first IF closes at the first paranthesis on line 11 in my picture. )
As I mentioned earlies, if you adjust your first table to this:
Options1:
Load dual(txt,value) as Options1 Inline [
txt, value
Millions, 1000000
Full value, 1];
then you could dimplify your current expression like this. I only applied it on the first IF in my example
/* The part inside this comment can be replaced by the expression below.
If(
GetFieldSelections(Options1)='Millions',
sum({<
account={'EX'},
Date={'$(=vTime1)'}
>}a_expenses)/1000000,
sum({
<account={'EX'},
Date={'$(=vTime1)'}
>}a_expenses)
)
*/
sum({<
account={'EX'},
Date={'$(=vTime1)'}
>}a_expenses)/only(Options1)
Hi Vegar, Can you make it for 2nd and 3rd Options as per my requirements.
It will be very helpful For me. But in there option = Not
Regards,
AK