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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
lpriceFTW
Helper II
Helper II

Distinct list of DATES only from column of DATE+TIMES

##########################################################################################

# I am removing all html formatting because of a Fabric error preventing me from posting. Please bear with me on this #

##########################################################################################

 

 

How do I create a new table of unique DATES (1/1/2023) from a column of DATETIMES (1/1/2023 10:30am)?

Lets say I have a column of DATETIMES like so:

 

___________________
| 10/1/23 10:30am |
| 10/1/23 11:30am |
| 10/1/23 9:30am   |
| 10/2/23 1:30pm  |
| 10/3/23 8:30am  |
| 10/3/23 7:30pm  |
| 10/3/23 5:30am  |

 

I want a returned table of unique DATE values like so:

 

___________
| 10/1/23 |
| 10/2/23 |
| 10/3/23 |

 

DAX would be something like:

 
```` dates = values(bot_activity_date[started].[dates]) //DOES NOT WORK!!! ```
1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@lpriceFTW  try this

 

EVALUATE
SUMMARIZE(ADDCOLUMNS(DATETIMES,"@yr", CONVERT(DATEVALUE(DATETIMES[colOne]),DATETIME)),[@yr])

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

6 REPLIES 6
smpa01
Super User
Super User

@lpriceFTW  try this

 

EVALUATE
SUMMARIZE(ADDCOLUMNS(DATETIMES,"@yr", CONVERT(DATEVALUE(DATETIMES[colOne]),DATETIME)),[@yr])

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

This worked. Thank you!

Anonymous
Not applicable

Create a Calulated Column in table
FieldDate = FORMAT(DateTime, "mm/dd/yyyy")
Then, in Data view of pbix file, create a new Table - there is a button under table tools

Add a column UniqueDates = DISTINCT(FieldDate)

 

shorter without a need for a calculated column in the source table:

 

Table =
   DISTINCT(
       SELECTCOLUMNS(
          SUMMARIZE(SourceTable, SourceTable[DateCol], "DateFormatted", FORMAT(SourceTable[DateCol], "DD/MM/YYYY")), [DateFormatted])
)
lukiz84
Memorable Member
Memorable Member

do you want to use powerquery or dax (if dax, then calculated table or only for a measure?)? 

DAX - its for a calculated table.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors