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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Singh_p
New Member

Convert a column to date data type

Hello, 

 

I am using a live database connection . Need to calculate inventory difference for present and past months .                               However the months is not in 'date' datatype and it is causing a problem.

 

I tried to create a new measure to convert it into date data type but since it is also a measure it is not accepted in quick measures for further calculation. 

 

Singh_p_0-1623159466211.png

Singh_p_2-1623159785326.png

 

 

Please suggest a solution. Thanks in advance. 

1 REPLY 1
selimovd
Super User
Super User

Hey @Singh_p ,

 

can you give more details about the data source.

If it's a live connection it means you connect to a Power BI Dataset or an Analysis Services Tabular model. Or do you mean direct query, what is querying a relational database during runtime?

Or do you mean the new composite model, what is in preview and allows a direct query of Azure AS and Power BI datasets?

 

But live database connection is not precise enough, because with all different modes a lot of things differ.

 

Thank you and best regards

Denis

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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