Forum Discussion

amirghaderi's avatar
amirghaderi
Helper IV
5 years ago
Solved

One Matrix for different metrics

I need to create the below matrix data from available data that I have. But, I am not sure how it can be done in one table view since the row grouping is not one consistant group.

 

ProjectBudgetActualCode1Code2Code3
A100150190CAAAssess
A100200150BBBAssess
A100200180CAASelect
A100122180BBBSelect
A100300200BBBFEED
A100260179DCCFEED
A200250300BCCSelect
A200135166CBBSelect
A200185179CBBAssess

 

Expected output

 

Filter by ProjectA100        
 AssessAssessAssessSelectSelectSelectFEEDFEEDFEED
 Input1Input2MetricInput1Input2MetricInput1Input2Metric
Total Budget (Input1) to Actual (Input2) Project Cost $                  350340350/340322360322/360560379560/379
Total Actual Code1 C (Input1)  to Total Actual Code1 B (Input 2)190150190/150180180180/18001800/180
Total Actual Code 2 BB (Input1) to Total Actual Cost (Input 2)150340150/340180360180/360200379200/379
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi amirghaderi ,

    I created a sample pbix file(see attachment) for you, please check whether that is what you want.

    1. Create a measure as below

    Metric =
    DIVIDE (
        CALCULATE ( SUM ( 'Table'[Budget] ) ),
        CALCULATE ( SUM ( 'Table'[Actual] ) )
    )

    2. Create a matrix visual (Rows: Project  Columns: Code3  Values: Budget, Actual and New measure)

    Best Regards

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi amirghaderi ,

    I created a sample pbix file(see attachment) for you, please check whether that is what you want.

    1. Create a measure as below

    Metric =
    DIVIDE (
        CALCULATE ( SUM ( 'Table'[Budget] ) ),
        CALCULATE ( SUM ( 'Table'[Actual] ) )
    )

    2. Create a matrix visual (Rows: Project  Columns: Code3  Values: Budget, Actual and New measure)

    Best Regards