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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
prollier
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

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.

 

no.PNG222.PNG

 

 

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.

View solution in original post

5 REPLIES 5
v-frfei-msft
Community Support
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)

222.PNG

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.

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

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.

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

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.

 

no.PNG222.PNG

 

 

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.

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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