Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Unanswered

Excel Power Query custom function zscore

(0) ShareShare
ReportReport
Posted on by

Using simple table

MeasurementValue
132.5
230.4
331.6

 

I want to add a new column called ZSCORE which would be ( [Measurement] - average([Value]) ) / standard_deviation([Value])

 

I created a new query (custom function) called fnZScore

 

let ZScore = (column as list) =>
     let
     average = List.Average(column),
     sdev = List.StandardDeviation(column)
in
     Table.AddColumn( "Z-Score", each (average - [Value])/sdev)
in
ZScore

 

I then tried to add an Invoke Custom Function Step

 

jhenke6229_0-1667880087635.png

 

However, this returns the following error:   Expression.Error: A cyclic reference was encountered during evaluation.

 

Any suggestions on how to alter this custom function?

 

 

 

 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Apps - Power Query

#1
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 7

#3
SD-13050734-0 Profile Picture

SD-13050734-0 6

Overall leaderboard

Featured topics