The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Please help me out with this, I'm unable to assing dates in formate, some are showing like 19/10/2020 some are 20212110.
Solved! Go to Solution.
Hi, @Fahad5
According to your description, I can clearly understand your requirement, you want to unite the date column in your dataset to the Date type with the same format. I think you can first try to simply try to change the data type in the Power query to unite the date format like this:
This method works for me.
If you still have a problem, just try to create a calculated column in the Power BI like this, which can also help you to achieve this:
Date1 =
IF(ISERROR(value(MID([Date],3,1))),
DATE(VALUE(RIGHT([Date],4)),VALUE(MID([Date],4,2)),VALUE(LEFT([Date],2))),
DATE(VALUE(LEFT([Date],4)),VALUE(MID([Date],5,2)),VALUE(RIGHT([Date],2))))
And you can get what you want.
You can download my test pbix file below
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Fahad5
According to your description, I can clearly understand your requirement, you want to unite the date column in your dataset to the Date type with the same format. I think you can first try to simply try to change the data type in the Power query to unite the date format like this:
This method works for me.
If you still have a problem, just try to create a calculated column in the Power BI like this, which can also help you to achieve this:
Date1 =
IF(ISERROR(value(MID([Date],3,1))),
DATE(VALUE(RIGHT([Date],4)),VALUE(MID([Date],4,2)),VALUE(LEFT([Date],2))),
DATE(VALUE(LEFT([Date],4)),VALUE(MID([Date],5,2)),VALUE(RIGHT([Date],2))))
And you can get what you want.
You can download my test pbix file below
If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.
How to Get Your Question Answered Quickly
Thank you very much!
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Fahad5
use this link: https://www.vahiddm.com/post/creating-calendar-table-with-3-steps
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |