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
Hello everyone!
I have a data base with all information of the contrats of the purchase coordination. All those contrats have an expiring date. I need to create a visual that counts how many days we are without an expired contract. For example, let's say yesterday was the last day with an expired contract, and the analyst finalyzed it, so today would be "1 day", tomorrow "2 days", ..., "3 days". And if a contract expire, the score goes to 0.
I'm not sure if I was clear...
Thanks!
Try Like
Days since last expire =
Var _last_expire = calculate(maxx(filter(contract,contract[maxdate]<today()), contract[maxdate]),all(contract[maxdate]))
Return
datediff(_last_expire, today(),DAY)Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Thanks for the support! It didnt work, but I think it's almost there...
The thing is, if the contract has been finalyzed before the expiring date, it's ok, this should not be considered. But if the contract is expired but not concluded, or it was finalyzed after the expiring date, this should be considered in the days score.
Another thing, I would like to start counting from 01/01/2020, than when some of the 2 conditions happens, the score starts from 0.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 33 | |
| 29 | |
| 26 |
| User | Count |
|---|---|
| 134 | |
| 104 | |
| 63 | |
| 60 | |
| 55 |