web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Excel Power Query cust...
Power Apps
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?

 

 

 

 

Categories:
I have the same question (0)

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard