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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Betty888
Helper II
Helper II

Table.group not working because of null values

Dear all,

I’m trying to group data based on merged column that I was able to handle successfully until this last step of “group by” where I get the following error message saying that a null value can't be converted to Text :

Betty888_0-1668127502762.png

I tried to come back to all the columns involved in the previous steps to replace null by “ “ (space) but I always receive this message.

My last tested solution was to use the following query at the beginning:

= Table.ReplaceValue(#"Previous step",null," ",Replacer.ReplaceValue, Table.ColumnNames (#"Previous step"))

but I still have some null values that create this error.

Can anyone help with any idea?

Many thanks in advance 🙏

Regards,  

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Betty888 ;

In Power Query, if a column value is a text type, empty will be displayed as " ", when the column value is a numeric type, empty will be displayed as null, according to your prompt, the number type of your column should be a number type rather than a text type, so you can't perform your operation, you can convert to text type first, and then operate.

vyalanwumsft_0-1668405290299.png

vyalanwumsft_1-1668405305960.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Betty888 ;

In Power Query, if a column value is a text type, empty will be displayed as " ", when the column value is a numeric type, empty will be displayed as null, according to your prompt, the number type of your column should be a number type rather than a text type, so you can't perform your operation, you can convert to text type first, and then operate.

vyalanwumsft_0-1668405290299.png

vyalanwumsft_1-1668405305960.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

BA_Pete
Super User
Super User

Hi @Betty888 ,

 

This doesn't look like a specific Group By issue. Group By doesn't generally care what your data types are, unless you're declaring them in one of the arguments.

Can you paste your query into a code window ( </> button ) here please? You can anonymise the source connection using XXX's if you want, but make sure to leave the connection function ( sql.database(...) etc.) in place.

 

Thanks,

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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