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! It's time to submit your entry. Live now!
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
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 38 | |
| 21 | |
| 21 |
| User | Count |
|---|---|
| 141 | |
| 105 | |
| 63 | |
| 36 | |
| 35 |