Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community,
- please refer below sampale data
Primary_Acct, Secondary_Acct, Final_Acct,Status
1 - 1 Live
2 3 3 Close
3 5 5 Close
4 6 6 Live
5 7 7 Close
6 9 9 Live
7 8 8 Close
8 - 8 Live
9 - 9 Live
10 - 10 Live
- I have this kind of data i want below output
1) if Primary_Acct Status is Live then show Final_Acct is Primary_Acct and Status of Primary_Acct.
2) if Primary_Acct Status is Close but present Secondary_Acct against Primary_Acct then show Final_Acct is Secondary_Acct and Status of Secondary_Acct .
- when I have applied some logic and above conditions i got below output till Fina_Acct is correct but i didn't got Status.
so how i will get correct status?
Primary_Acct, Secondary_Acct, Final_Acct,Status
1 - 1 Live
2 3 3 Live
3 5 5 Close
4 6 6 Live
5 7 7 Live
6 9 9 Live
7 8 8 Close
8 - 8 Close
9 - 9 Live
10 - 10 Live
Thanks in advance.
In your sample data, what is the Secondary Status?
Have a look at this. May be help you.
Hi,
considering Primary_Acct,Scondary_Acct and Status is from same table
then try below code
Load Primary_Acct,
Secondary_Acct,
Status,
If(wildmatch(Status,'Live'),Primary_Acct,Secondary_Acct) as Final_Acct
From TableName;
Regards
may be like this?
Load
*,
if(Status='Live', Primary_Acct,Secondary_Acct) as FinalAccount
from
Table;
Hi Pradip,Max,Balraj
Thank u for your reply.
1) i want logic in front End not in Edit scripte because i can not change any linking which is done by prevoiuse developer.
2) i want below status in Status field
if Primary_Acct field status is Live then Status should be Live and if Primary_Acct field status is close but Secondary_Acct field status is Live then Status it should be Live and Final_Acct should be Secondary_Acct.
As per your data, there is no status for Secondary Account. Please sent the proper data so that we can help you.
Hi Pradip,
1) I got only Primary_Acct and Secondary_Acct excel file data.
2) I mapped that with my account master table and i got Final_Acct field in front end.
3) I have also mention this in my expected output.
Please refere below expected output
Primary_Acct, Secondary_Acct, Final_Acct,Status
1 - 1 Live
2 3 3 Live - Here Secondary account status is Live
3 5 5 Close
4 6 6 Live
5 7 7 Live - Here Secondary aacount status is Live
6 9 9 Live
7 8 8 Close
8 - 8 Close
9 - 9 Live
10 - 10 Live
Hi Every one,
Thanks for your reply.
I got solution of my question.
First i brought primary account status and then secondary account status.
Then i got final account status.