Forum Discussion

angsoka's avatar
angsoka
Frequent Visitor
2 years ago

DAX for Input Output Analysis

Dear all

I am embarking on a project to construct an input-output matrix encompassing several regions and economic sectors. To illustrate, let’s consider 3 regions and 4 sectors. This will result in a 12 x 12 square matrix, where each cell’s value indicates the amount of output from one sector (as denoted by the column) required as input by another sector (as represented by the row).

 

  reg Areg Areg Areg Areg Breg Breg Breg Breg Creg Creg Creg C
  sec 1sec 2sec 3sec 4sec 1sec 2sec 3sec 4sec 1sec 2sec 3sec 4

reg A

sec 1426613683577
reg Asec 2683636639325
reg Asec 3534782599948
reg Asec 4721568538614
reg Bsec 1644611883492
reg Bsec 2748327134615
reg Bsec 3922161672179
reg Bsec 4635235285148
reg Csec 1272812556962
reg Csec 2342263846272
reg Csec 3289953561415
reg Csec 4854817876893

 

The question :
1. How should we structure the data and what measurements and queries are necessary to accurately capture the input-output dynamics across these sectors and regions?
2. The aim is to synthesize an aggregate table. For instance, I intend to combine regions A and B into a new entity named "non C", and sum sectors 1, 2, and 3 to create a category "other than 4". This will enable us to condense the information into a more manageable 4 x 4 matrix.

Please help
Oka



1 Reply

  • Adescrit's avatar
    Adescrit
    Impactful Individual

    Hi angsoka 

    You should be able to achieve the 12x 12 matrix with a dataset with four columns:

    Region    Sector    Input    Output

     

    You can then create a 5th column on the table using DAX with the logic:

     

    Not Sector 4 Calc = 
        IF( Table[Sector] = "sec 4", Table[Sector], "Other than 4 )

     

    You can use similar logic for the "Non C" calculation on regions. Then add both of these new columns to a matrix visual in Power BI, with calculations to sum the input and output.