Discussion Board for collaboration on QlikView Scripting.
I have 2 fields with data.
I want 2 strings of data seperated by semicolon that match ItemType & Cost group by Key.
Go to Solution.
You can do the concat and preserve the order by using RecNo() as the sort weight parameter:
concat(ItemType,',',RecNo()) as ItemTypeCombined,
concat(Cost,',',RecNo()) as CostCombined
(html, codepage is 1252, embedded labels, table is @1)
Group by Key;
Use Key as Dimension and Concat(Itemtype,';') and Concat(Cost,';') as expressions.
May be this?
Concat(item,' ') as Newfield,
Concat(cost, ',') as field2
Group by key;
Anil doing concat as you suggested will loose it orignal sort order. It will do numbers from low to high and text field Alphabetical order. That's not what i want.
It will loose the sort order i want. Your way would produce.
123 12,43,87 (if number fell in differently it would sort by low to high)
i want to preserve the sort order as per data.
Any other method of doing this on the fly in the chart instead of within script?
Yes. Save the RecNo() in a field and then use that in the chart expression.
RecNo() as RecId,
(html, codepage is 1252, embedded labels, table is @1);
Then chart Dim "Key" and expressions: