Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
I need help for this DAX...I created to get max date from the timestamps, but it gives me date with 12:00 AM.
How can I get the exact same date?
Thanks,
Solved! Go to Solution.
Hi @topazz11 ,
We can use two ways to meet your requirement.
Measure =
VAR a =
DATE ( YEAR ( MAX( 'Table'[ingestion_ts] ) ), MONTH ( MAX ( 'Table'[ingestion_ts] ) ), DAY ( MAX ( 'Table'[ingestion_ts] ) ) )
VAR b =
CALCULATE (
MAX ( 'Table'[ingestion_ts] ),
FILTER (
ALLSELECTED('Table'),
DATE ( YEAR ( 'Table'[ingestion_ts] ), MONTH ( 'Table'[ingestion_ts] ), DAY ( 'Table'[ingestion_ts] ) ) = a
)
)
RETURN
IF(MAX('Table'[ingestion_ts])<>b,BLANK(),b)
Measure 2 =
var t = FORMAT(MAX('Table'[ingestion_ts]),"YYYYMMDD")
var t2 = CALCULATE(MAX('Table'[ingestion_ts]),ALLSELECTED('Table'),FORMAT('Table'[ingestion_ts],"YYYYMMDD")=t)
return
IF(
t2=MAX('Table'[ingestion_ts]),t2,BLANK())
BTW, pbix as attached.
Best regards,
Hi @topazz11 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi @topazz11 ,
We can use two ways to meet your requirement.
Measure =
VAR a =
DATE ( YEAR ( MAX( 'Table'[ingestion_ts] ) ), MONTH ( MAX ( 'Table'[ingestion_ts] ) ), DAY ( MAX ( 'Table'[ingestion_ts] ) ) )
VAR b =
CALCULATE (
MAX ( 'Table'[ingestion_ts] ),
FILTER (
ALLSELECTED('Table'),
DATE ( YEAR ( 'Table'[ingestion_ts] ), MONTH ( 'Table'[ingestion_ts] ), DAY ( 'Table'[ingestion_ts] ) ) = a
)
)
RETURN
IF(MAX('Table'[ingestion_ts])<>b,BLANK(),b)
Measure 2 =
var t = FORMAT(MAX('Table'[ingestion_ts]),"YYYYMMDD")
var t2 = CALCULATE(MAX('Table'[ingestion_ts]),ALLSELECTED('Table'),FORMAT('Table'[ingestion_ts],"YYYYMMDD")=t)
return
IF(
t2=MAX('Table'[ingestion_ts]),t2,BLANK())
BTW, pbix as attached.
Best regards,
Hi @topazz11 ,
You can try removing the ".[Date]", so you code will look like:
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 21 | |
| 20 | |
| 14 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 41 | |
| 33 | |
| 31 |