Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
It is a very simple topic, but I can't find the solution, I need to set the days between 2 dates, try "Datediff", but it asks for the dates, but when I write the field, the program does not take it:
I also tried to create a measure in another table that pulls the date that I need, but I couldn't, can someone help me? Thanks
Solved! Go to Solution.
Hi @miguelHG
Are you sure your fields are Date or DateTime fields? I used this formula to test and it works fine:
CalculatedColumn:
Datediff = DATEDIFF('Table'[DocDate],'Table'[DocDueDate],DAY)
And for a measure:
DateDiffMeasure = DATEDIFF(SELECTEDVALUE('Table'[DocDate]),SELECTEDVALUE('Table'[DocDueDate]),DAY)
Result:
Eric.
Hi @miguelHG
Are you sure your fields are Date or DateTime fields? I used this formula to test and it works fine:
CalculatedColumn:
Datediff = DATEDIFF('Table'[DocDate],'Table'[DocDueDate],DAY)
And for a measure:
DateDiffMeasure = DATEDIFF(SELECTEDVALUE('Table'[DocDate]),SELECTEDVALUE('Table'[DocDueDate]),DAY)
Result:
Eric.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 49 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 87 | |
| 69 | |
| 38 | |
| 29 | |
| 26 |