Matrix load using a Connector DataSource

OSAdmin
Valued Contributor
Originally posted by Cosimo Palmisano

4/26/2019

Matrix load using a Connector DataSource
I'm trying to setup a data source for matrix loading using a connector data source / query which returns 12 columns of data (M1 to M12). I've setup the data source to include 12 Time source dimensions with data type being Matrix DataKey Text. The source field for each time source dimension are fields P01 to P12 as shown in screenshot below.
Has anyone tried this? For the matrix field, how do I determine which time member the field is supposed to represent? Each time column is named P01 to P12 so would the Matrix Header Value Line be 0?

0bbf59271b9d9c90a2b264a7bc4bcbe4.png

 

2 REPLIES 2

OSAdmin
Valued Contributor
Originally posted by Puja Patel

If you put in the time period value in the 'Static Value' setting under Logical Expression and Override Settings, the system will know which time to use (e.g. 2020M1 for Period 1). If you want to make it dynamic to use year over year, change your Logical Operator to 'Complex Expression' and use the following:

Dim sYear As String = TimeDimHelper.GetYearFromId(api.WorkflowUnitPk.TimeKey).ToString

Return sYear & "M1"

 

where you change Mx to the period for each of your Time Source Dimensions. 

OSAdmin
Valued Contributor
Originally posted by Eric Osmanski

694dda83dbe5d8108feee3a84b9619f0.png