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
Hi,
How would in DAX calculate the number of days between 2 date columns
Wanted outcome (format: whole number): 2
Note: some Colum2 will be blank - here I would like a blank cell as outcome as well
Solved! Go to Solution.
Hi,
It seems this will work:
= IFERROR
(DATEDIFF(
table[column1],
table[column2],
DAY),
BLANK())
Wont work,
I alsso tried:
DATEDIFF
MIN( table[column1]),
MAX( table[column2]),
DAY)
@Anonymous , That is the measure .Hope your date setting is correct
Can you share a sample pbix after removing sensitive data.
Hi,
It seems the your link is about the date format and a slicer,
What i need is the date difference in days from 2 columns already formatted as date - as a DAX formula,
Hi,
It seems this will work:
= IFERROR
(DATEDIFF(
table[column1],
table[column2],
DAY),
BLANK())
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |