How to transpose row data for reporting

erik_alvarez
ServiceNow Employee
ServiceNow Employee

Hi, I receive from an external provider a table with the following format:

UserDateDuration 1
Duration 2
Duration 3
Duration 4
Duration 5
Duration 6
Erik01-01-20171 minute 10 seconds1 minute 10 seconds1 minute 10 seconds1 minute 10 seconds1 minute 10 seconds1 minute 10 seconds

Is there a way to create a pie chart from only this row? Showing the total of all duration columns and separating each duration column?   Similar to the image below.

find_real_file.png

I tried with an option for multiple sets with Performance analytics subscription but it only allows 5 sets of data and in this case there will be more and also only allows column, line and bar chats.   Can I transpose to vertical so I can generate the pie chart or any other chart?

Also tried with custom charts and was able to produce something close to what is needed but it doesn't seem to support dynamic conditions as in sys_user -> dynamic -> me. I would have to create a custom chart for each user and manually add it to their homepage or dashboard?

Thanks!

1 ACCEPTED SOLUTION

ianfhawkins
Giga Contributor

I don't think there's an easy way to do this.

I had a similar requirement to display incident state metric data as columns along side incident record data, with no duplicate incident rows. I ended up making a new table that transposed the data and business rules that kept the data in sync and created new columns as new incident states were found. Then I used a database view to join it with the incident table.

View solution in original post

3 REPLIES 3

ianfhawkins
Giga Contributor

I don't think there's an easy way to do this.

I had a similar requirement to display incident state metric data as columns along side incident record data, with no duplicate incident rows. I ended up making a new table that transposed the data and business rules that kept the data in sync and created new columns as new incident states were found. Then I used a database view to join it with the incident table.

Hi Ian,  I actually ended up doing the same thing as you at the time.  Thanks for the response.

Can you share how you created a new table with transposed data in ServiceNow?