cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## Issue With calculation of LOG( ) in a measure

I need to calculate the LOG of a average of a value divided by a variable.

When I add them in a measure en displau the variables seperatly everything goes well, but when I do a LOG over the value the result is incorrect.

MSR =
VAR MyAverage = AVERAGE(metingen[Value])
VAR MyNorm = MAX(parameters[Norm])
RETURN
LOG(MyAverage / MyNorm)

The myaverage in my case is 3.8, and the mynorm is 1.8.

MyAverage/MyNorm = 2.1111111 (so far so good)
The LOG returns -0.6755 when it should be 0.3245

Can someone point me the right direction?

1 ACCEPTED SOLUTION
Community Support

Hi @prollier,

I think that should be the issue that your data type of parameters[norm]. If you can replace "," to "." and change the column to number. Then wverything should be ok later.

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
5 REPLIES 5
Community Support

Hi @prollier,

Based on my test, I can get the proper result here by your formula. And my sample data and the result are as the picture below. Could you please share your pbix to me? I think that should be the issue of your data.

```MSR =
VAR MyAverage = AVERAGE(metingen[Value])
VAR MyNorm = MAX(parameters[Norm])
RETURN
LOG(MyAverage / MyNorm)```

For mroe details, please check the pbix as attached.

https://www.dropbox.com/s/7jiyxezfu0ydfqc/Issue%20With%20calculation%20of%20LOG%28%20%29%20in%20a%20...

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
New Member

Frank,

I can't make my data public. I'll try to simplify it and get you a sample.
When I make a new table with only the values of that parameter it works, but when I link more tables and have more parameters it doesn't work. I'll check my relations between the tables

Regards,

Peter

Community Support

Hi @prollier,

Has your issue been solved? Any question, feel free to let me know please.

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
New Member

Frank,

I'll send you a PM with a link to the file, I did not get to a solution.
The MSR is in the pink table showing te wrong results.

Regards

Peter

Community Support

Hi @prollier,

I think that should be the issue that your data type of parameters[norm]. If you can replace "," to "." and change the column to number. Then wverything should be ok later.

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.