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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ojt1
Frequent Visitor

New Column - How to subtract and divide by measures, getting Nan error

Hi

 

I have created Median Messure and Standard Deviation Measure from columnA, and am now having difficulty creating a new column using these measures = 

 

New Column = ('table1'[ColumnA] - 'table1'[MedianMeasure]) / 'table1'[StandarDeviationMeasure]

 

My measures are both positive numbers, and all values in my column A are above 0, so nothing is diving by zero.

 

Any suggestions? 

I am working using the above calcuation based on the accepting solution to this thread:

https://community.fabric.microsoft.com/t5/Desktop/Can-PowerBi-give-me-Z-Scores/m-p/251709#M111820

 

 

1 ACCEPTED SOLUTION
ojt1
Frequent Visitor

Incase anyone else has the same problem, through the link below, I found that you cannot devide a measure by a column, and instead need to create a measure of the column. After which, you can use the 3 measures to create a new Calculated Column:
https://forum.enterprisedna.co/t/z-scores-in-dax/4551

View solution in original post

3 REPLIES 3
ojt1
Frequent Visitor

Incase anyone else has the same problem, through the link below, I found that you cannot devide a measure by a column, and instead need to create a measure of the column. After which, you can use the 3 measures to create a new Calculated Column:
https://forum.enterprisedna.co/t/z-scores-in-dax/4551

Sahir_Maharaj
Super User
Super User

Hello @ojt1,

 

Can you please try this:

Standardized ColumnA Measure = 
VAR MedianValue = [MedianMeasure]
VAR StandardDeviationValue = [StandardDeviationMeasure]
RETURN
DIVIDE(
    'table1'[ColumnA] - MedianValue,
    StandardDeviationValue
)

Hope this helps.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Hi Sahir

 

Thank you for the reply. This calculation does not return anything in the column. I noticed you named it 'measure', which is slightly confusing for a column.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.