The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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:
Solved! Go to Solution.
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.
@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.
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)
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?
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.
User | Count |
---|---|
87 | |
84 | |
36 | |
35 | |
32 |
User | Count |
---|---|
96 | |
75 | |
67 | |
52 | |
52 |