MATRIX CONNECTOR MULTI YEAR LOAD
Hi- Our scenario is set up as Range ( say 2022M1 to 2024M12). I have a database table which have Jan to dec as columns and I have Year also as a column. So we have different year 2022, 2023 as rows and the data is in Jan to dec. IS there any way to load all of this together. Right now i can use a matrix data and put in a complex expression which can either say workflow time & "M1" etc or i can read a literal parameter read the year to be loaded and i can concat and return in the data source. But is there a way in data source complex expression or a parser business rule that I can get the value of another column in the data source , so i can reference what is the field value of the year and the concatenate that.
i resolved this by writing a union sql.
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M1') as 'Time' , Jan as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M2') as 'Time', Feb as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M3') as 'Time', Mar as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M4') as 'Time' , Apr as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M5') as 'Time', May as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M6') as 'Time', Jun as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M7') as 'Time', Jul as 'Amount'from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M8') as 'Time', Aug as 'Amount'from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M9') as 'Time' , Sep as 'Amount'from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M10') as 'Time', Oct as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M11') as 'Time' , Nov as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'
UNION ALL
Select RegisterID,Entity,Account,CONCAT(WFTimeName,'M12') as 'Time' , Dec as 'Amount'
from XFC_PLP_Forecast where WFScenarioName = '4_32_Forecast'