Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |