Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago
Solved

Calculate Percentage on Columns

Dear

I have the following table (visual), I have data from the "Ranking, Total Events, No Count, and Yes Count" columns.

This data varies with date filtering.

I need to get the "Yes Percentage" column, as shown in the attached table, calculated as: " (Yes Account)*100/(No Account) .

In the "Total" row, I need you to enter the total percentage over total events, not the average of the percentages in the same column.

Please help with how to implement the solution.

Best regards

ClassificationTotal EventsAccount NoAccount YesPercentage Yes
A31267%
B303100%
C1611594%
D101100%
Total2322191%
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Syndicate_Admin 

    You can create a measure

    Measure =
    SUMX (
        VALUES ( 'Table'[Classification] ),
        DIVIDE ( SUM ( 'Table'[Account Yes] ), SUM ( 'Table'[Total Events] ) )
    )
    

    Output

     

    Best Regards!

    Yolo Zhu

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

2 Replies

  • Try this:

    Dax: 

    PercentYes = DIVIDE(SUMX(Class,Class[YesAccount]), SUMX(Class, Class[TotalEvents]))
     
    Be sure to mark as the solution and thumbs up if I help you!
  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Syndicate_Admin 

    You can create a measure

    Measure =
    SUMX (
        VALUES ( 'Table'[Classification] ),
        DIVIDE ( SUM ( 'Table'[Account Yes] ), SUM ( 'Table'[Total Events] ) )
    )
    

    Output

     

    Best Regards!

    Yolo Zhu

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