Skip to main content
cancel
Showing results for 
Search instead 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

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors