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
Dear all,
I am new to power BI and self learning from different platforms. I am facing an issue in calcualtion of "Vacant Days " in a simple database for Property Management. any one can help me to write a Dax ( Calculated Colum or Dax ) to Calculate the total Vacant Days of each individual apartment . Table is Copy pasted below. Some rows are colored Blue showing the same apartment no Repeated .
| Tenant Name | Tenant ID | Apt No | Move in | Move out | Tenants Status | Apt Status | Vacant Days |
| Tenant1 | 61101 | 101 | 06-Jul-23 | 06-Jul-24 | Move out | Vacant | |
| Tenant2 | 61102 | 102 | 16-Jul-23 | 16-Jul-24 | Move out | Vacant | |
| Tenant3 | 61103 | 103 | 26-Jul-23 | 26-Jul-24 | Move out | Vacant | |
| Tenant4 | 61104 | 201 | 05-Aug-23 | 05-Aug-24 | Move out | Vacant | |
| Tenant5 | 61105 | 202 | 15-Aug-23 | 15-Aug-24 | Move out | Vacant | |
| Tenant6 | 61106 | 203 | 25-Aug-23 | 25-Aug-24 | Move out | Vacant | |
| Tenant7 | 61107 | 301 | 04-Sep-23 | 04-Sep-24 | Move out | Vacant | |
| Tenant8 | 61108 | 302 | 14-Sep-23 | 14-Sep-24 | Move out | Vacant | |
| Tenant9 | 61109 | 303 | 24-Sep-23 | 24-Sep-24 | Move out | Vacant | |
| Tenant10 | 61110 | 401 | 04-Oct-23 | 04-Oct-24 | Move out | Vacant | |
| Tenant11 | 61111 | 402 | 14-Oct-23 | 14-Oct-24 | Move out | Vacant | |
| Tenant12 | 61112 | 403 | 24-Oct-23 | 24-Oct-24 | Move out | Vacant | |
| Tenant13 | 61113 | 501 | 03-Nov-23 | 03-Nov-24 | Move out | Vacant | |
| Tenant14 | 61114 | 502 | 13-Nov-23 | 13-Nov-24 | Move out | Vacant | |
| Tenant15 | 61115 | 503 | 23-Nov-23 | 23-Nov-24 | Move out | Vacant | |
| Tenant16 | 61116 | 601 | 03-Dec-23 | 03-Dec-24 | Move out | Vacant | |
| Tenant17 | 61117 | 101 | 13-Dec-23 | 13-Dec-24 | active | Rented | |
| Tenant18 | 61118 | 603 | 23-Dec-23 | 23-Dec-24 | active | Rented | |
| Tenant19 | 61122 | 101 | 02-Jan-24 | 02-Jan-25 | active | Rented | |
| Tenant20 | 61123 | 702 | 12-Jan-24 | 12-Jan-25 | active | Rented |
Solved! Go to Solution.
Table is a placeholder name
Make a new column like this
Number of Days =
DATEDIFF ( table[Move in], table[Move out], DAY )
Than make a DAX code
Total number of vacant days =
CALCULATE ( SUM ( Table[Number of Days] ), StatusApt = Vacant )
I hope this help 🙂
I am waiting for the solution. Issue not resolved yet. Any one can help
Table is a placeholder name
Make a new column like this
Number of Days =
DATEDIFF ( table[Move in], table[Move out], DAY )
Than make a DAX code
Total number of vacant days =
CALCULATE ( SUM ( Table[Number of Days] ), StatusApt = Vacant )
I hope this help 🙂
Thank you Sir for the response.
This gives number of occupancy days, Vacant days will be the difference between move out date and Next Move in Date of any apartment. thats why i have colored apartment no 101 as blue.
I don't understand this message. Can you try to rephrase it?
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 126 | |
| 88 | |
| 78 | |
| 66 | |
| 65 |