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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Kumar_0606
Helper I
Helper I

Percentage value is incorrect while dividing Calculated columns

Hello Experts,

 

I am trying to divide 2 calculated columns to get the percentage but getting wrong result.

 Calculated column1= IF (Table[Version] = "New" && Table[Code] = "ABC" && Table[Year] < 2022, (Value]).


Likewise created column2 and tried 

DIVIDE(Calculated column1, Calculated column2) getting wrong values.

 

I tried creating a New Measure like

Calculated column1= If ( MAX (Table[Version]= "New" && MAX ( Table[Code] = "ABC" && Table[Year]< 2022, SUM(Value) , the value displayed is Blank.

 

Thanks in advance.

 

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Kumar_0606 Instead of creating a calculated column for the division, it's better to create a measure. Measures are more dynamic and can handle aggregations better.

 

DAX
Measure1 = SUM ( Table[CalculatedColumn1] )
Measure2 = SUM ( Table[CalculatedColumn2] )

PercentageMeasure = DIVIDE ( [Measure1], [Measure2], 0 )

 

If you want to create a measure that sums values based on conditions, you should use the CALCULATE function.

DAX
Measure1 = CALCULATE (
SUM ( Table[Value] ),
Table[Version] = "New",
Table[Code] = "ABC",
Table[Year] < 2022
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Kumar_0606 Instead of creating a calculated column for the division, it's better to create a measure. Measures are more dynamic and can handle aggregations better.

 

DAX
Measure1 = SUM ( Table[CalculatedColumn1] )
Measure2 = SUM ( Table[CalculatedColumn2] )

PercentageMeasure = DIVIDE ( [Measure1], [Measure2], 0 )

 

If you want to create a measure that sums values based on conditions, you should use the CALCULATE function.

DAX
Measure1 = CALCULATE (
SUM ( Table[Value] ),
Table[Version] = "New",
Table[Code] = "ABC",
Table[Year] < 2022
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thanks Bhanu.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors