Forum Discussion

nanchil's avatar
nanchil
New Member
6 years ago
Solved

Help with summing alternative columns

Hello everyone,   Thanks in advance for your help.  The last row is the formula that needed to be calculated.  Any help is apprecaited.     Neg Neg Percent Of Total Tested Pending Pending ...
  • v-lili6-msft's avatar
    6 years ago

    hi  nanchil 

    For SUM calculation, you could just drag the field into visual directly,

    for Percent measure, you could create this measure as below:

    Measure Neg Percent Of Total Tested = 
    DIVIDE (
        CALCULATE ( SUM ( 'Table'[Neg] ) ),
        CALCULATE ( SUM ( 'Table'[Total tested] ) )
    )
    Measure Pending Percent Of Total Tested = 
    DIVIDE (
        CALCULATE ( SUM ( 'Table'[Pending] ) ),
        CALCULATE ( SUM ( 'Table'[Total tested] ) )
    )
    Measure Pos Percent Of Known Results = 
    DIVIDE (
        CALCULATE ( SUM ( 'Table'[Pos] ) ),
        CALCULATE ( SUM ( 'Table'[Pos] ) )+CALCULATE(SUM('Table'[Neg]))
    )
    Measure Pos Percent of Total Tested = 
    DIVIDE (
        CALCULATE ( SUM ( 'Table'[Pos] ) ),
        CALCULATE ( SUM ( 'Table'[Total tested] ) )
    )

     

    Result:

     

    and here is sample pbix file, please try it.

     

    Regards,

    Lin