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
sccode_works
New Member

Calculated column in the DB2 view through direct query gives the below error

Getting the following error when calculated column is added to the report. All these calculations are done in Db2 view. When calculated column is removed, the error disappears.

 

Couldn't load the data for this visual

 

OLE DB or ODBC error:[DataSource.Error] Microsoft Db2 Client: HISMPCB0001 in BasePrimitiveConverter an exception has occurred. Exception description: Non-negative number required.

Parameter name: count SQLSTATE=HY000 SQLCODE=-343

 

The calculated column used in the power BI report has non-negative values. 

 

Please help. 

 

 

2 REPLIES 2
Anonymous
Not applicable

Are you making a calculation in your SQL request ? like Multiplication (*) or Division (/) of numbers or decimals ? 

If it's the case, split it in two columns at request level and make the calculation in power BI with power Query 😉

I hope my answer helps.

Anonymous
Not applicable

Hi @sccode_works ,

Can you please share some dummy data that keep the raw data structure and dax expressions with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

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.