I am attempting to Transpose the columns and rows on a view, however the rows are dates that change weekly which I cannot seem to get functioning correctly.
What I have is the below;
Date | Report1 | Report2 |
---------- | ------- | ------- |
2017-07-01 | N/A | Yes |
2017-07-02 | Yes | Yes |
2017-07-03 | N/A | Yes |
2017-07-04 | Yes | Yes |
2017-07-05 | N/A | Yes |
2017-07-06 | NULL | NULL |
2017-07-07 | N/A | N/A |
and what I want it to look like is;
Date | 2017-07-01 | 2017-07-02 | 2017-07-03 | 2017-07-04 | 2017-07-05 | 2017-07-06 | 2017-07-07 |
-------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- |
Report1 | N/A | Yes | N/A | Yes | N/A | Null | N/A |
Report2 | Yes | Yes | Yes | Yes | Yes | Null | N/A |
The only issue is that the Dates are rolling so the column names will change. *There are also a lot more reports but for simplicity 2 will suffice"