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
Anonymous
Not applicable

Calculation error with power operator

I am receiving the following error message when trying to perform a calculation in a measure which uses a power operator:

 

Error Message:
MdxScript(Model) (65, 142) Calculation error in measure 'TEST_DATA'[Measure 2]: An argument of function 'POWER' has the wrong data type or the result is too large or too small.

 

The Measure causing the issue is as follows:

                       Measure 2 = (1-((1-[Measure 1])^(0.5)))
 
where Measure 1 = (Measure A * Weight A) + (Measure B + Weight B)+....+(Measure F * Weight F)
and is a number between 0 and 1
 
All measures are displayed in Matrix with Account ID as the Row identifier. If I try and simplify Measure 2 to something like:
 
                                     Measure 2 = (1-((1-[Measure 1])*(0.5)))
 
then this calculates everything correctly, so the problem appears to be with the '^', I just can't figure out why.
 
Any help much appreciated.
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi Gary I've managed to resolve this. I added in a 'divide by total weight' to Measure 1:

 

     Measure 1 = ((Measure A * Weight A) + (Measure B * Weight B)+....+(Measure F * Weight F)) / (Weight A + Weight B+.....+Weight F)

 

No idea why it was causing problems not having that in.

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

@Anonymous Hmm, I can seem to replicate this but perhaps try:

Measure 2 = 1 - POWER( 1-[Measure 1], 0.5)

I was trying very small numbers like 0.00000001^(.5) and very large numbers, negative numbers, etc.

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Just to add something, I've tried replacing 'Measure 1' in the calculation with 'Measure A' (which is just a column taken from my source data by using MAX, and it calculates without any issues. So for some reason it doesn't like Measure 1.

 

Edit 1: The 'Weights' in Measure 1 are coming from Paramters (user selectable values between 0 and 1). If I hard code in set weights into Measure 1 then Measure 2 works.

 

Edit 2: I've managed to resolve this, I added in a 'divide by total weight' to Measure 1:

 

     Measure 1 = ((Measure A * Weight A) + (Measure B + Weight B)+....+(Measure F * Weight F)) / (Weight A + Weight B+.....+Weight F)

 

 

Anonymous
Not applicable

Still not working I'm afraid Greg

@Anonymous Perhaps put Measure 1 in some table visual and see if there is an odd value in there in some circumstance? I guess another way to put this, in what way are you using the measure, in a table or matrix or in a Card visual?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi Gary I've managed to resolve this. I added in a 'divide by total weight' to Measure 1:

 

     Measure 1 = ((Measure A * Weight A) + (Measure B * Weight B)+....+(Measure F * Weight F)) / (Weight A + Weight B+.....+Weight F)

 

No idea why it was causing problems not having that in.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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