This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi, I am tryng to write an if function that will give the number of days between two dates, with some quaifications.
IF DateB is BLANK, then count the days from DateA to today's date
IF DateA is after (greater than) DateB, then show 0 (zero days)
ELSE Count the days between DateA and DateB
I have written this formula, and not have any luck so far...I am getting a "Too many arguments...." message.
Solved! Go to Solution.
Hi @Milagros
Try this:
Days Void to Contractor =
IF (
ISBLANK ( 'Source data'[Keys to Maintenance Contractor] ),
DATEDIFF ( 'Source data'[Void Date], TODAY (), DAY ),
IF (
'Source data'[Void Date] > 'Source data'[Keys to Maintenance Contractor],
0,
DATEDIFF (
'Source data'[Void Date],
'Source data'[Keys Returned from Contractor],
DAY
)
)
)
I used DAX Studio to help figure out where the missing )'s were!
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Hi @Milagros
Try this:
Days Void to Contractor =
IF (
ISBLANK ( 'Source data'[Keys to Maintenance Contractor] ),
DATEDIFF ( 'Source data'[Void Date], TODAY (), DAY ),
IF (
'Source data'[Void Date] > 'Source data'[Keys to Maintenance Contractor],
0,
DATEDIFF (
'Source data'[Void Date],
'Source data'[Keys Returned from Contractor],
DAY
)
)
)
I used DAX Studio to help figure out where the missing )'s were!
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
Big thanks DataZoe....that works! :):):)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 61 | |
| 36 | |
| 29 | |
| 22 | |
| 21 |