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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Khomotjo
Helper II
Helper II

Format Date_Time

Morning I have a date_time field and I want to  only the date Field. This is the original data : 

Khomotjo_0-1737527752756.png

 

 

This is the table when I format and select short date , The issue is that Power Bi still considers the time and hence I have duplicate records of the same date, I want only 1 record for each of the dates.

Khomotjo_1-1737527845521.png

 I tried  

Finalised_Date = DATE(YEAR(StockMovements[FinalisedDate]),MONTH(StockMovements[FinalisedDate]),DAY(StockMovements[FinalisedDate])) but got error :  

 

Khomotjo_3-1737527973924.png

 

2 ACCEPTED SOLUTIONS
danextian
Super User
Super User

You are seeing multiple dates because you simply changed the display or formatting but not the actual data type. Several methods to extract the date:

danextian_0-1737532678519.png

danextian_2-1737532740407.png

danextian_3-1737532794478.png

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

View solution in original post

Anonymous
Not applicable

Hi @Khomotjo ,

 

Thanks to danextian  and uzuntasgokberk  for their quick answers. I have some other thoughts to add:
(1) Here is my test data.

vtangjiemsft_0-1737598986882.png

(2) Create a calculation table. Select the Date column to change the data type.

Table =
ADDCOLUMNS (
    SUMMARIZE ( 'Table_3', [FinalisedDate], [id] ),
    "date",
        DATE ( YEAR ( [FinalisedDate] ), MONTH ( [FinalisedDate] ), DAY ( [FinalisedDate] ) )
)

vtangjiemsft_2-1737599181967.png

vtangjiemsft_3-1737599310125.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Khomotjo ,

 

Thanks to danextian  and uzuntasgokberk  for their quick answers. I have some other thoughts to add:
(1) Here is my test data.

vtangjiemsft_0-1737598986882.png

(2) Create a calculation table. Select the Date column to change the data type.

Table =
ADDCOLUMNS (
    SUMMARIZE ( 'Table_3', [FinalisedDate], [id] ),
    "date",
        DATE ( YEAR ( [FinalisedDate] ), MONTH ( [FinalisedDate] ), DAY ( [FinalisedDate] ) )
)

vtangjiemsft_2-1737599181967.png

vtangjiemsft_3-1737599310125.png

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

danextian
Super User
Super User

You are seeing multiple dates because you simply changed the display or formatting but not the actual data type. Several methods to extract the date:

danextian_0-1737532678519.png

danextian_2-1737532740407.png

danextian_3-1737532794478.png

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
uzuntasgokberk
Super User
Super User

Hello @Khomotjo ,

Could you please try that navigate to Power Query(Transform Data), select Finalised_Date, Change Data Type to "Date/Time", Change Data Type "Date" and remove duplicates. This way is more performance and effective way.

 

Here is the example:

 

let
  Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtE3MNc3MlMwNLMyNrcyMFOKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Date Time" = _t]),
  #"Changed column type" = Table.TransformColumnTypes(Source, {{"Date Time", type datetime}}),
  #"Changed column type 1" = Table.TransformColumnTypes(#"Changed column type", {{"Date Time", type date}}),
  #"Removed duplicates" = Table.Distinct(#"Changed column type 1", {"Date Time"})
in
  #"Removed duplicates"

 

 

uzuntasgokberk_0-1737529419579.png

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

Thanks @uzuntasgokberk  I forgot to mention that this is a direct query in power BI. Also  each line  represent a unique order line and the exact time these orders were finalised.  I am interested in the day and not necesarily when(time) the  specific order line was finalised.

 

Hello @Khomotjo ,

Okey, so you'd like to see only day values.Could you please try new calculated column(how to create calculated column: https://learn.microsoft.com/en-us/power-bi/transform-model/desktop-calculated-columns) to your table and write below the dax code:
" Day Column = DAY('YourTable'[YourDate])"

And I'd like to mention that this error indicates that there is a circular dependency in the data model, first we can first check the relationship between the tables in the whole data model, if a table references itself directly or indirectly through other tables, a circular reference occurs.(https://community.fabric.microsoft.com/t5/Report-Server/COULDN-T-LOAD-THE-DATA-FOR-THIS-VISUAL-OLE-D...)

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors