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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

powerquery M function to calculate logarithmic average of an text array

Dear,

I've been struggling to get a simple function to work.

{36.7 41.1 52.9 43.4 38.3 47.7 34.1 33.3 30.1 33.4 28.2 26.3 27}

This is one example value (text) that is in a column named [Terzen].

All the values need to be converted into a list, secondly multiplied with the power of 10. then averaged, and then taken by a log 10. (logarithmic average of third octave sound levels).

 

I have tried to add a custom column using the following functions but I have never succeeded to create a working function.

number.log10(list.average(number.power(Text.ToList([Terzen]),10))))

 

Are there any ideas?

Since i have to use this option a couple of times in this dataset, it is not as easy as to split the list into a table and do the operations in consecutive steps since this will make the code too messy.

 

BR

Thilo

 

1 ACCEPTED SOLUTION
jaweher899
Impactful Individual
Impactful Individual

please try

 

List.Average(List.Transform(Text.Split([Terzen], " "), each Number.Log10(Number.Power(10, Number.FromText(_)/10))))

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thanks, that does the calulation. I had to insert one additional step to remove the "{" and "}" and was not able to get it done in one step, but that is ok.

jaweher899
Impactful Individual
Impactful Individual

please try

 

List.Average(List.Transform(Text.Split([Terzen], " "), each Number.Log10(Number.Power(10, Number.FromText(_)/10))))

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors