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,880 points
188 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))
answered Dec 8, 2020 by Gitika
• 65,870 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 21, 2019 in Power BI by anonymous
• 32,910 points
7,644 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 17, 2019 in Power BI by ch
• 3,450 points
621 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,870 points
60 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,870 points
121 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
• 32,910 points
211 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,420 points
15,772 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
6,373 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,420 points
129 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,870 points
139 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,870 points
48 views