Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
73 | |
58 | |
40 | |
35 |
User | Count |
---|---|
84 | |
69 | |
59 | |
46 | |
46 |