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 nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi Friends,
I am using lastdate function in my tabular model.
Following is my measure
SUMX(VALUES(ClaimRoot[Claim Number]),
CALCULATE( SUM(ClaimRoot[ThreePointDaysQuantity]),LASTDATE(ClaimRoot[EffectiveTimestamp]))
)
In PowerBi Dektop I am getting following error
A date Column containing duplicate dates was specified in the call to function 'LastDate'. This is not supported
Please help
Hi @vickyprudhvi,
In DAX, when adding filters in CALCULATE() function, it must be either a boolean expression or a table expression that defines a filter. And the LASTDATE() returns a table containing a single column and single row with a date value. So the syntax of your DAX is correct. In this scenario, you need to check if there are duplicated rows in ClaimRoot[EffectiveTimestamp] column as the error message mentioned.
Regards,
@vickyprudhvi Tell us more about the table you are working on. The formula by iteslf seems okay
Also it would help if you write out in a sentence what you want the measure to calculate. I's like DAX poetry, bonus point for a haiku ...
every claim number,
sum "three points day quantity",
last day in filter
I don't think you can throw a function like that into the second argument of a calculate. you might need this ...
SUMX(VALUES(ClaimRoot[Claim Number]),
CALCULATE( SUM(ClaimRoot[ThreePointDaysQuantity]),
FILTER(ClaimRoot,
ClaimRoot[EffectiveTimestamp] = LASTDATE(ClaimRoot[EffectiveTimestamp]
)
)
)
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 |
|---|---|
| 23 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |