How to convert eight digit yyyymmdd to date using DAX in Power BI

0 votes

I'm trying to convert eight digit yyyymmdd to date format with DAX function.

column = DATE(LEFT(TABLE[COLUMN],4),MID(TABLE[COLUMN],5,2),RIGHT(TABLE[COLUMN],2))

However, I've got an error because of the original column has some records with "00000000", so how can I make a default value with IF statement or are there any better solution?

Dec 8, 2020 in Power BI by Rajiv
• 8,910 points
1,538 views

1 answer to this question.

0 votes

You can go through this:

column = IFERROR( DATE(LEFT(TABLE[COLUMN],4),MID(TABLE[COLUMN],5,2),RIGHT(TABLE[COLUMN],2)), DATE(yyyy,mm,dd))


If you are interested in learning Power BI, check out Power BI Syllabus now!

answered Dec 8, 2020 by Gitika
• 65,850 points

Related Questions In Power BI

0 votes
1 answer

How to rename a column using DAX in Power BI?

Hi Ramya, I found these two function that ...READ MORE

answered Aug 22, 2019 in Power BI by anonymous
• 33,010 points

edited Dec 31, 2021 by Soumya 15,463 views
0 votes
0 answers

How to break datetime field to date field in power bi?

How to break DateTime field to date ...READ MORE

Oct 18, 2019 in Power BI by ch
• 3,450 points
810 views
0 votes
1 answer

How to create a Measure using Power BI DAX?

The following steps make your task simple ...READ MORE

answered Oct 27, 2020 in Power BI by Gitika
• 65,850 points
228 views
0 votes
1 answer

How to use Dynamic DAX Number Format in power BI?

You can give them the same display ...READ MORE

answered Dec 8, 2020 in Power BI by Gitika
• 65,850 points
1,014 views
+1 vote
1 answer

display the count of rows matching some criteria

Do you want to show a table ...READ MORE

answered Aug 5, 2019 in Power BI by anonymous
• 33,010 points
351 views
0 votes
3 answers

How to add an extra column to the existing table in power bi query editor?

Click on edit queries after loading source ...READ MORE

answered Dec 16, 2020 in Power BI by Roshni
• 10,500 points
45,393 views
0 votes
1 answer

How to demote Headers in Power BI query editor?

Hi, There are the steps which you can ...READ MORE

answered Feb 3, 2020 in Power BI by Jitesh
13,433 views
0 votes
0 answers

How to Split Columns in Power BI?

Can anyone demonstrate how to split columns ...READ MORE

Feb 4, 2020 in Power BI by Roshni
• 10,500 points
223 views
0 votes
1 answer

Using DAX calculation how to calculate monthly budget till today in power bi Desktop?

You can make use of this: MTD Budget ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,850 points
588 views
0 votes
1 answer

How to analyze the data in Power BI using Excel?

Once you've enabled editing and content, Excel ...READ MORE

answered Oct 27, 2020 in Power BI by Gitika
• 65,850 points
185 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP