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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How can I extract Year from a date column in direct query mode? I don't have access to power query.

I have a date column in the format dd/mm/yyyy and I want to create a new "only year" column. The data is coming from AAS server and I don't have access to the data model or power query.

Can I create a calculated column for this? If yes, then how?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , I doubt in live connection you can create a new column

 

New column required is = right([Column],4)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

I'm afraid not, Direct Query mode has restrictions on the use of DAX, calculated columns are limited to within rows, only other columns in the same table can be referenced, and no aggregation functions can be used.

 

If you want to use the calculated column to get the year, you can try to change the Direct Query mode to Import mode.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , I doubt in live connection you can create a new column

 

New column required is = right([Column],4)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.