Pages

Sunday, March 17, 2013

How to produce normalized output or Convert rows into columns

I/P:
IDJanFebMarch
1100120135
2110130120

O/P:
ID
Month
Sales
1
Jan
100
1
Feb
120
1
March
135
2
Jan
110
2
Feb
130
2
March
120

Sol:
This can be done using the normalizer
In Normalizer tab add two ports ID and Sales.for sales put occurs=3

When for sales occurs =3 is given that time in ports sales_in1,sales_in2,sales_in3 will appear.
Connect Jan_sales->sales_in1
              Feb_sales->sales_in2
              Mar_sales->sales_in3
Use the expresion to identify month
             GCID_Sales=GCID_Sales
Month =IIF
(GCID_Sales=1,'JAN',IIF(GCID_Sales=2,'FEB','MAR'))

No comments:

Post a Comment