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
Either I'm not googling properly, or the answer just doesn't seem to exist but I have a requirement from a business users to show how much time is left until a project completion date like this:
26 months, 3 weeks, 5 days.
Then once we get within a month of completion it should only show 3 weeks and 6 days, then 3 weeks and 5 days, etc.
DATEDIF in Excel seems capable of this, but I'd prefer to do it in Power BI/DAX, but DATEDIFF in DAX can't as far as I know.
Thanks
Solved! Go to Solution.
Here's one way to do it.
Remaining =
VAR due =
MIN ( Projects[DueDate] )
VAR adj =
IF ( DAY ( due ) < DAY ( TODAY () ), -1, 0 )
VAR months =
DATEDIFF ( TODAY (), due, MONTH )
VAR adjdue =
EDATE ( TODAY (), months + adj )
VAR remainingdays =
INT ( due - adjdue )
VAR weeks =
INT ( remainingdays / 7 )
VAR days =
MOD ( remainingdays, 7 )
VAR monthstext =
IF ( months + adj = 0, "", months + adj & " months " )
VAR weekstext =
IF ( weeks = 0, "", weeks & " weeks " )
VAR daystext =
IF ( days = 0, "", days & " days" )
RETURN
monthstext & weekstext & daystext
Pat
Here's one way to do it.
Remaining =
VAR due =
MIN ( Projects[DueDate] )
VAR adj =
IF ( DAY ( due ) < DAY ( TODAY () ), -1, 0 )
VAR months =
DATEDIFF ( TODAY (), due, MONTH )
VAR adjdue =
EDATE ( TODAY (), months + adj )
VAR remainingdays =
INT ( due - adjdue )
VAR weeks =
INT ( remainingdays / 7 )
VAR days =
MOD ( remainingdays, 7 )
VAR monthstext =
IF ( months + adj = 0, "", months + adj & " months " )
VAR weekstext =
IF ( weeks = 0, "", weeks & " weeks " )
VAR daystext =
IF ( days = 0, "", days & " days" )
RETURN
monthstext & weekstext & daystext
Pat
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |