Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi, I've the table as below; need help
LOAD * Inline [
ID,Status
1,Open
1,Complete
2,Complete
3,Open
3,Complete];
I want to have the final table as
ID,Status
1,Open
2,Complete
3,Open
Basically single ID and if Status is Open for the ID in any Row then display status as 'open' else 'complete'
thank you
You can try this
Table:
LOAD *,
Match(Status, 'Open', 'Complete') as Status_Num_Value;
LOAD * INLINE [
ID, Status
1, Open
1, Complete
2, Complete
3, Open
3, Complete
];
Right Join (Table)
LOAD ID,
Min(Status_Num_Value) as Status_Num_Value
Resident Table
Group By ID;
You can try this
Table:
LOAD *,
Match(Status, 'Open', 'Complete') as Status_Num_Value;
LOAD * INLINE [
ID, Status
1, Open
1, Complete
2, Complete
3, Open
3, Complete
];
Right Join (Table)
LOAD ID,
Min(Status_Num_Value) as Status_Num_Value
Resident Table
Group By ID;
Thank you Sunny. Appreciated the quick response
I'll try to customize this for my data.