Forum Discussion

joshig's avatar
joshig
Frequent Visitor
4 years ago
Solved

Calculate Percentage based on Matrix Columns

I am working on Matrix visual and I have to calculate percentage based on the Column data. The data is represented below and I need a new column percentage that needs to be calculated for e.g for the...
  • AlexisOlson's avatar
    4 years ago

    Like this?

    Percentage =
    DIVIDE (
        CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "MBE" ),
        CALCULATE ( SUM ( Table1[Amount] ), Table1[Spending] = "Expenditure" )
    )
  • AlexisOlson's avatar
    AlexisOlson
    4 years ago

    I'd recommend taking SPENDING off of the matrix columns and defining separate measures for MBE and Expenditure then putting all three measures in the visual. You can use the numerator and denominator of the measure I gave before to define these new measures.