Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi all, i am new to PowerBI.
I receive a date value from our database as well as an integer (number of days to deadline).
The problem is, that this value is always positiv, also when the deadline is missed.
So i want to use the date value to transform the daysToDeadline value into a negativ value when the date is lower than today.
I have tried the way excel does this, but this won't work.
Here is my code::
anpVerzug = IF(AND(DATE(qryAuftraegeAnDisplays[Starttermin_Plan].[Jahr],qryAuftraegeAnDisplays[Starttermin_Plan].[Monat],qryAuftraegeAnDisplays[Starttermin_Plan].[Tag]) < TODAY(), NOT ISBLANK(qryAuftraegeAnDisplays[Starttermin_Plan])), qryAuftraegeAnDisplays[Verzug] * -1, qryAuftraegeAnDisplays[Verzug])
Starttermin_Plan is the date
Verzug is the number of days to deadline.
How can i solve this?
I think you can simplify the date comparison and it will reduce to this:
anpVerzug = IF(AND(qryAuftraegeAnDisplays[Starttermin_Plan] < TODAY(), NOT ISBLANK(qryAuftraegeAnDisplays[Starttermin_Plan])), qryAuftraegeAnDisplays[Verzug] * -1, qryAuftraegeAnDisplays[Verzug])
I haven't tested it, try it out
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 66 | |
| 41 | |
| 39 | |
| 39 | |
| 38 |