Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Currently i have a table as such:
Type | Type ID |
Medical | 123 |
Medical | 126 |
Vehicle | ABC |
Medical | 127 |
What i would like....
Type | Med ID | Vehicle ID |
Medical | 123 | |
Medical | 126 | |
Vehicle | ABC | |
Medical | 127 |
how does one do this?
If(IsNum([Type ID]), [Type ID],Null()) as "Med ID"
If(IsText([Type ID]), [Type ID],Null()) as "Vehicle ID"
A generic 🙂 approach that can handle multiple Types is
Data:
Generic
LOAD Type, Type & ' ID', [Type ID]
Inline [
Type, Type ID
Medical, 123
Medical, 126
Vehicle, ABC
Medical, 127
];
See https://qlikviewcookbook.com/2010/05/use-cases-for-generic-load/
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
didnt seem to work... just gave me a column name called [Type] ID rather than 'Medical ID' or Vehicle ID
am i makiing an error?
I'm guessing your error is that you are using single quotes around the [Type] field name. It should be unquoted. Can you post your Generic Load statement?
-Rob