Last post Oct 01, 2012 11:35 AM by TP
Oct 01, 2012 11:03 AM|fiorano|LINK
Im trying to create a drilldown matrix using a dataset but I think I need to transpose my dataset. Ultimately, I need to display % values for a set of measures.
I have currently set a series of flags to 1 or 0. Im then summing these flag fields and dividing them by the total number of rows to get each percentage.
My Dataset is set out in the following way
My report matrix needs to drill down in this way:
Division -->Sector --> Meaure (Each of the individual Flag fields) with Year as a Column Group and a percentage as the Value field.
Im getting stuck where my Measures (Flag Fields) are a column on each row and I need these vertically in the matrix...
Any help is very much appreciated
Oct 01, 2012 11:21 AM|TP|LINK
What you can do is Create a blank datatable with the columns you want. Loop thorugh the old dataset and transpose the rows in the new columns.
Oct 01, 2012 11:29 AM|fiorano|LINK
Thanks for your reply. That sounds a bit complex for me! Dont suppose you have a sample script ?
Oct 01, 2012 11:35 AM|TP|LINK
You can use Pivot to transpose the data in the SQL itself.
Please refer this link : http://stackoverflow.com/questions/10699997/sql-server-transpose-rows-into-columns