Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have the following table format:
ID | Ststus | DaysInStatus |
---|---|---|
1 | New | 3 |
1 | Active | 2 |
1 | InTest | 1 |
1 | Completed | 4 |
I want to transform the table above in a table like this:
ID | [Days in New] | [Days in Active] | [Days in In Test] | {Days In Completed] |
---|---|---|---|---|
1 | 3 | 2 | 1 | 4 |
I think this is possible using CrossTable(), but i cant get it to work.
Thanks a lot!
try using generic load
thanks, but isnt it possible to create a table like i want in the data model ?
Hi,
for this you can use pivot table to show data like this.
see in attachment
Regards:
Narender
If you want this in the Script you could try, not sure if it's the best solution but try it
LOAD ID,
Ststus as Status,
IF(DaysInStatus=1,DaysInStatus) AS [Days In Test],
IF(DaysInStatus=2,DaysInStatus) AS [Days In Active],
IF(DaysInStatus=3,DaysInStatus) AS [Days In New],
IF(DaysInStatus=4,DaysInStatus) AS [Days In Completed]
FROM