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

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

Reply
Anonymous
Not applicable

How to divide values using the total of a column rather than taking an average of the values in col?

My Data

Day               Col 1            Col 2               Average

      1           1                    1                        100%

        2          1                     0                         ""

          3        ....... and on and on

Total         36                     54                     100%

Column 1 and 2 only have 1's or zeros. 

 

I want the average of the 36/54 rather than an average of the 100%'s. The average column is the calc col 1 / col 2. 

 

What can I do here? I guess an easy way to describe it is that I want the total weighted average

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

It seems you want to change the result of a visual. If you don't have any filter in column [day], you can try a formula like this:

Average =
IF (
    ISFILTERED ( Table1[Day] ),
    DIVIDE ( MIN ( 'Table1'[Col1] ), MIN ( 'Table1'[Col2] ), 1 ),
    DIVIDE ( SUM ( Table1[Col1] ), SUM ( Table1[Col2] ), 1 )
)

If you don't have any aggregated function applied, you can try a formula like this:

 

Average 2 =
DIVIDE ( SUM ( Table1[Col1] ), SUM ( Table1[Col2] ), 1 )

How to divide values using the total of a column rather than taking an average of the values in .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
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

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Could you please mark the proper answer as solution or share the solution if it's convenient for you? That will be a big help to the others.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

It seems you want to change the result of a visual. If you don't have any filter in column [day], you can try a formula like this:

Average =
IF (
    ISFILTERED ( Table1[Day] ),
    DIVIDE ( MIN ( 'Table1'[Col1] ), MIN ( 'Table1'[Col2] ), 1 ),
    DIVIDE ( SUM ( Table1[Col1] ), SUM ( Table1[Col2] ), 1 )
)

If you don't have any aggregated function applied, you can try a formula like this:

 

Average 2 =
DIVIDE ( SUM ( Table1[Col1] ), SUM ( Table1[Col2] ), 1 )

How to divide values using the total of a column rather than taking an average of the values in .jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards!

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Create a measure that gets the sum from col 2 at the month level. Something like:

 

Calculate(SUM(MyData[col2]),All(MyData[Day])

 

This will remove any filter on the day, summing up col2.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors