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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
keshavmurthyn
New Member

I want to connect IBM DB2 through Direct query with the SQL statement option

Hai Team,

Im trying to connect to IBM DB2 through direct query mode but Its not allowing me to write a SQL statement. I want to create some calculated column like , 

 

DateMonth      year

522                   21

523                    21

524                    21

.

.

.  

 

I have a column like this 5th month and 22nd day I want to use these columns and calculate date column like 05/22/21. Conditions are I have to use Direct Query. It would be really appreciatable if anybody can solve my problem.

 

Thanks in Advance!

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

Hi @keshavmurthyn ,

 

Create a column as below:

Date = 
var _month=LEFT('Table'[DateMonth ],1)
var _day=RIGHT('Table'[DateMonth ],LEN('Table'[DateMonth ])-1)
Return
DATE(20&'Table'[year],_month,_day)

And you will see:

v-kelly-msft_0-1622104311290.png

Calculated column is supported in direct query mode.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

View solution in original post

1 REPLY 1
v-kelly-msft
Community Support
Community Support

Hi @keshavmurthyn ,

 

Create a column as below:

Date = 
var _month=LEFT('Table'[DateMonth ],1)
var _day=RIGHT('Table'[DateMonth ],LEN('Table'[DateMonth ])-1)
Return
DATE(20&'Table'[year],_month,_day)

And you will see:

v-kelly-msft_0-1622104311290.png

Calculated column is supported in direct query mode.

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Kudoed Authors