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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
KarenQ
Frequent Visitor

How to convert text 06/ to date in power bi Table View (text to date conversion)

Hi, I am working on a sales data table in Table View, having 09 Data Period and 2023 as Data Period on two columns to represent current month Mar 2024 as an example.

I created  the below:

MonthNo = if('Sales'[Data Period]<7, 'Sales'[Data Period]+6, 'Sales'[Data Period]-6)
Year = if('Sales'[Data Period]>6,'Sales'[Data Year]+1,'Sales'[Data Year])
Full = 'Sales'[MonthNo]&"-"&'Sales'[Year],
then comes the issue when I created the below. 
FullMonth = datevalue('Sales'[Full])
 
KarenQ_0-1711498925997.png

 

 

Strangely this way of doing dates have been working to me all the time in the past and it even works on my another Bi file. 

not sure why but it gives below. 

 

KarenQ_1-1711499048082.png

 

it is perfecting working as per below in my other Bi files.

KarenQ_2-1711499120932.png

 

 

Anyone could look at this for me please. 

1 ACCEPTED SOLUTION

Use a calculated column to convert the string into proper ISO8601 format

 

yyyy-mm-dd

 

You can use DATE(year, month, day)  to achieve the same (with day replaced by 1)

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

How often does this data change?  Right, never!  There is no need to compute that.  Use an external reference table.

hi thanks for prompt reply. This sales data is udpated daily so I do need to build it into modeling. 

Use a calculated column to convert the string into proper ISO8601 format

 

yyyy-mm-dd

 

You can use DATE(year, month, day)  to achieve the same (with day replaced by 1)

thanks a lot.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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