Hi Experts,
I need to create a report on EQUI, KSML, AUSP tables, to list out the equipment which meets the selection criteria on characteristics and it's values.
I am able to make the join conditions fine, but during testing it is noticed that characteristic values in AUSP are stored in one column,
so it will be as below,
Equipment Equipment type Characteristic Characteristic value 400010 Bridge Char 1 Char value 1 400010 Bridge Char 2 Char Value 2 400010 Bridge Char 3 Char Value 3With that, I am unable to apply the selection criteria on char 1 and char 2 value combination, for this I will have to store the data in different columns, one column for each characteristic value. as below,
Equipment Equipment type Char 1 Char 2 Char 3 400010 Bridge Char 1 Value Char 2 value Char 3 Valuethere is no other table which stores the data in this way.So I will have to get the data available in this format, during HANA modeling. I created 3 calculated columns and used simple formulas to populate the values,
char 1 formula is if characteristic = char 1 then update char 1 value
the output is displayed in the following way,
Equipment Equipment type Char 1 Char 2 Char 3 400010 Bridge Char 1 value Blank Blank 400010 Bridge Blank Char 2 Value Blank 400010 Bridge Blank Blank Char 3 valueBut I would need to display them in one row for report on this model.
Can you suggest me the best way to do the transpose of rows to columns and make them in one row? is there a way to achieve by doing any other projections and aggregations in the calculation view? Please let me know.
Sreekanth,
Please use STRING_AGG function and go with scripted calculation view, not graphical calculation view.
Please check following link for more details.
Add a comment