Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Syndicate_Admin
Administrator
Administrator

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%
1 ACCEPTED SOLUTION
v-xinruzhu-msft
Community Support
Community Support

Hi @Syndicate_Admin 

You can create a measure

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

Output

vxinruzhumsft_0-1699336175058.png

 

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.

View solution in original post

2 REPLIES 2
v-xinruzhu-msft
Community Support
Community Support

Hi @Syndicate_Admin 

You can create a measure

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

Output

vxinruzhumsft_0-1699336175058.png

 

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.

Data-estDog
Resolver II
Resolver II

Try this:

DataestDog_0-1699017779097.png

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!

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.