Forum Discussion

nathansh's avatar
nathansh
Frequent Visitor
2 years ago
Solved

percentage colum

Hello, how can i add a colum on report view that will preset the percentage "Transport" per Building? thank you
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi nathansh ,

    Please try this DAX to create a measure:

     

     

    Measure = 
    VAR A = MAX('Table'[Count])
    VAR B = CALCULATE(SUM('Table'[Count]),ALLEXCEPT('Table', 'Table'[Transport]))
    RETURN
    DIVIDE(A, B)

     

     

    The final output is as below:



    Or you can try this DAX to create a calculated column:

     

    precentage = 
    VAR A = 'Table'[Count]
    VAR B = CALCULATE(SUM('Table'[Count]),ALLEXCEPT('Table', 'Table'[Transport]))
    RETURN
    DIVIDE(A, B)

     

    The final output is as below:

     

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.