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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
NOVICE02
Helper III
Helper III

replace character with number

Brand new to Power BI here and I have searched to no avail...

 

Is it possible to replace a character with a number using DAX? I am selecting data for the model using direct query and one of the columns that i need to calculate sum of has the value "NULL". I have tried using the substitute function but realized that it only replaces a string with a string. I can't use the replace function in the transform tab because of direct query. Is there a way to do this or should i just ask the database admin to replace all "NULL" with 0 on his end?

 

Thank you

1 ACCEPTED SOLUTION
bharathvee
Frequent Visitor

Hi @NOVICE02,

 

If you just after summing the columns and ignoring NULL values, the PowerBI will automatically ignore the NULL values and sum up the total. See the attached image for the sample.

Sum total with null valuesSum total with null values

 

If this is not what you are after, copy a sample of your data and share it here.

View solution in original post

2 REPLIES 2
bharathvee
Frequent Visitor

Hi @NOVICE02,

 

If you just after summing the columns and ignoring NULL values, the PowerBI will automatically ignore the NULL values and sum up the total. See the attached image for the sample.

Sum total with null valuesSum total with null values

 

If this is not what you are after, copy a sample of your data and share it here.

You are correct. I was looking at the data wrong. Thank you

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors
Top Kudoed Authors