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,870 points
• 6,374 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 more about Power BI, then check out the affordable Power BI certification cost now!

answered Dec 8, 2020 by Gitika
• 65,730 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,050 points

edited Dec 31, 2021 by Soumya • 43,424 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
• 2,253 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,730 points
• 2,179 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,730 points
• 3,665 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,050 points
• 3,191 views
0 votes
4 answers

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

R|ight click on the table you want ...READ MORE

answered Nov 18, 2022 in Power BI by Madelein Tolmay
• 83,793 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
• 21,018 views
0 votes
1 answer

How to Split Columns in Power BI?

Splitting columns in Power BI using the ...READ MORE

answered Jan 6, 2024 in Power BI by anonymous
• 1,420 points
• 2,293 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,730 points
• 3,241 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,730 points
• 1,794 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP