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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Syndicate_Admin
Administrator
Administrator

Table Pivot = Cannot convert null to logical

Hello. I am trying to pivot some columns with power query and something broke in the process since the last time I set it up. 

 

The code auto generated by power bi: 

= Table.Pivot(#"Added Custom3", List.Distinct(#"Added Custom3"[SeriesType]), "SeriesType", "Value", List.Sum)

 

The error message: 

Expression.Error: We cannot convert the value null to type Logical.
Details:
Value=
Type=[Type]

 

I know that something is coming up null, but am not adept at the code enough to know how to remove the null values during this step. The "Value" column is a decimal, and transforming nulls to 0 will likely affect other calculations done after this step. Any suggestions on what the adapted code should look like?

 

Thank you!

2 REPLIES 2
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Please see the solution in this blog post:

Solved: “[Expression.Error] We cannot convert the value null to type Logical” in Power BI

 

If this doesn't help, consider providing the context of the steps.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

ToddChitt
Super User
Super User

Can you give us a sample of your data BEFORE the pivot? 

Your PIVOT will destroy and 0 you have so why worry about it?




Did I answer your question? If so, mark my post as a solution. Also consider helping someone else in the forums!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.