Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have loaded a table where two column/row combinations need to be displayed next to each other.
Actual Qlik Table Result
ID | Field Type | Field String Value | Field Date Value |
---|---|---|---|
1 | Type | Started | null |
1 | Date | null | 6/15/18 |
I would like to get a result in a qlik table like this:
ID1 | Field String Value | Field Date Value |
---|---|---|
1 | Started | 6/15/18 |
The 2 rows in the first example share the same ID#.
Do I have any options of:
I am stuck on this one and wanted to ask the community since I am missing something here.
Thanks!
I can't seem to get this working using crosstable.
Any ideas?
Hi Ray,
If you want to manage this on script side, you can use group by with maxstring function for the fields.
load
ID,
MaxString("Field String Value") as "Field String Value",
MaxString("Field Date Value") as "Field Date Value"
Inline [
ID,"Field Type","Field String Value","Field Date Value"
1,'Type','Started',
1,'Date',,'6/15/18'
]
group by ID;
If you want to achieve this on front end, You can add measures to your table with maxstring function.
Thanks for this but what about if there are multiple Types/Dates for the same ID?
ID Field Type Field String Value Field Date Value
1 Type Started
1 Date 6/15/18
1 Type Ended
1 Date 6/20/18
How would I handle this?
Hi Ray,
How abuot this,
load
ID,
IF(LEN("Field String Value")=0,Previous("Field String Value"),"Field String Value") as "Field String Value",
"Field Date Value"
Inline [
ID,"Field Type","Field String Value","Field Date Value"
1,'Type','Started',
1,'Date',,'6/15/18'
1,Type,Ended,
1,Date,,6/20/18
]
where len("Field Date Value")>0;
I can't get this to work. I am trying to have this be a new table and read from a resident table. It does not like the where clause before or after the resident table line.