Hi Team,
I wanted to create Matrix with Project in Y axis and Year and X Axis and cell contains count of issues.
I am using the Below Code:
SELECT T1.'Project',
[2015] as Year_2015,
[2016] as Year_2016,
[2017] as Year_2017,
[2018] as Year_2018,
[2019] as Year_2019,
[2020] as Year_2020,
[2021] as Year_2021,
[2022] as Year_2022,
[2023] as Year_2023
FROM ( SELECT T1.'Project',YEAR(T1.'Created') as Year_,T1.'Key') as Source_Table
PIVOT
(
COUNT(T1.'Key') FOR Year_
IN ([2015],[2016],[2017],[2018],[2019],[2020],[2021],[2022],[2023])) AS pivottable
Order by T1.Project
In above code, its says "FOR " is not supported. Could anyone help in this