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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
DBPropest
New Member

Divide Filtered Matrix Column by Total

Hello,

 

I am new to the forum and have some experience using power bi. Please refer to the image for 

 

Question: How can I divide the yes column by the total for creating a new measure?

 

Example: for December 2022 there were 393 "yes" and 1308 "total" and I am trying to create a measure that divides the 393/1308 for a percentage of 30%.

 

I am trying to add an additional column for that percentage.

 

Thanks.

 

power bi.PNG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @DBPropest,

You can try to use the following measure formula if it suitable for your requirement:

formula =
DIVIDE (
    CALCULATE (
        COUNT ( Table[Image] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Month] ),
        VALUES ( Table[Image] )
    ),
    CALCULATE (
        COUNT ( Table[Image] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Month] )
    )
)

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @DBPropest,

You can try to use the following measure formula if it suitable for your requirement:

formula =
DIVIDE (
    CALCULATE (
        COUNT ( Table[Image] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Month] ),
        VALUES ( Table[Image] )
    ),
    CALCULATE (
        COUNT ( Table[Image] ),
        ALLSELECTED ( Table ),
        VALUES ( Table[Month] )
    )
)

Regards,

Xiaoxin Sheng

Priya1969
Resolver I
Resolver I

Sample Data:

ImageValueMonth
Yes500January
No600February
Yes300March
No200April
Yes300May
Yes250April
No100January
Yes50February
No120March
No80May

 

1. Select the Transform button on the top and go to the power query. There select, the month column, then select pivot option. It will change your data format.

2.  Select Add column- custom column - give formula yes+no and enter ok. It will give total value.

3. Again select add column-custom column - give formula yes/new custom column. It will give desire value. Then, changed the data type to % and rename the column name.

Out Put:

Priya1969_0-1672360221523.png

Now, select the Matix visual, like below, you will get the desired out put.

 

Priya1969_1-1672360314601.png

 

   

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.