Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Now i have a problem with a field: status In this field i can have 3 values
O , M or F ; this values i wanna translate to
O=Off M=Mag and F=Fac and the field must have the name Status
if (Status=O, .................................. ?
Who can help
Hello Francis,
You may use something like (untested)
If(Pick(Match(Status, 'O', 'M', 'F'), 'Off', 'Mag', 'Fac'))
But I'd strongly recommend you to use a mapping table:
StatusMap:MAPPING LOAD * INLINE [Input, OutputO, OffM, MagF, Fac]; LOAD *, ApplyMap('StatusMap', Status) AS StatusFROM file.qvd (qvd);
Hope that helps
Hello Francis,
You may use something like (untested)
If(Pick(Match(Status, 'O', 'M', 'F'), 'Off', 'Mag', 'Fac'))
But I'd strongly recommend you to use a mapping table:
StatusMap:MAPPING LOAD * INLINE [Input, OutputO, OffM, MagF, Fac]; LOAD *, ApplyMap('StatusMap', Status) AS StatusFROM file.qvd (qvd);
Hope that helps
You can use something more simple.....
IF(Status='0','Off',IF(Status='M','Mag','FAC'))
thank you. I have made a mapping table. I can use this often in future!