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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Sayedkamal
Regular Visitor

Serious problem with calculated column

Hello there 

 

I have a problem that may make me hit the wall. 

 

I am creating a calculated column like this 

 

= [b]-'Customer List'[Last 6 Months Purchases]/-[m]

 

 

This gives all NAN values. 

 

But when I replace the variables with the actual values, the calculation is ok and the values appear normally. 

 

Why using variables give NANs and the actual values give normal values? 

 

All variables are formatted as decimals and they are number values. 

 

Please help. 

1 ACCEPTED SOLUTION

Hi @Sayedkamal ,

use your measures for visuals not for calculated columns.

13-05-_2021_01-15-40.png

 

PBIX-file is attached.

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Sayedkamal,

Did FrankAT 's suggestions help with your scenario? if that is the case, you can consider Kudo or accept this suggestion to help others who faced similar requirements to find it more quickly.

If these also not help, please share more detailed information to help us clarify your scenario to test.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

HotChilli
Super User
Super User

Please post a data sample (not a picture).

Here, 

 

https://drive.google.com/file/d/1ZwMjm0-pT_5jcvEyDqRFQdZqShqe_2Jr/view?usp=sharing

 

You can find the pbix file. 

 

 

2021-05-12_23-52.png

 

If [b] and [m] replaced with the actual values you can see on the Report view, the values shows normally. 

Hi @Sayedkamal ,

use your measures for visuals not for calculated columns.

13-05-_2021_01-15-40.png

 

PBIX-file is attached.

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

Well, knock me down with a feather,

I've just answered a forum question where someone was using measures in a calculated column.  I don't recommend it.

Replace it with the appropriate DAX.  At least you'll be able to debug any formulas a bit easier.

In your case, the measure [m] is 0 or unknown in the context of this calculated column.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.