Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I've had 9 tenants in my apartments from 2024 to 2025. Using Variables, how can I show that in 2025, 57% (4 out of the 7) of the tenants had been evicted, please?
| Tenant | Date_Moved_In | Evicted |
| 1 | 01/10/2024 | Yes |
| 2 | 01/11/2024 | Yes |
| 3 | 01/02/2025 | No |
| 4 | 02/02/2025 | Yes |
| 5 | 03/02/2025 | Yes |
| 6 | 04/02/2025 | Yes |
| 7 | 05/02/2025 | Yes |
| 8 | 06/02/2025 | No |
| 9 | 07/02/2025 | No |
Solved! Go to Solution.
EvictionRate2025 =
VAR Tenants2025 =
FILTER(
'Tenants',
YEAR('Tenants'[Date_Moved_In]) = 2025
)
VAR Total2025 = COUNTROWS(Tenants2025)
VAR Evicted2025 =
COUNTROWS(
FILTER(
Tenants2025,
'Tenants'[Evicted] = "Yes"
)
)
RETURN
DIVIDE(Evicted2025, Total2025, 0) * 100
This returns 57.14% as a numeric value. You can wrap it in FORMAT(..., "0.00%") if you want it styled as a percentage.
Hello !
You can use a measure :
Eviction % (2025) =
VAR Tenants2025 =
CALCULATE(
DISTINCTCOUNT('Tenants'[Tenant]),
KEEPFILTERS( YEAR('Tenants'[Date_Moved_In]) = 2025 ),
REMOVEFILTERS('Tenants'[Evicted])
)
VAR Evicted2025 =
CALCULATE(
DISTINCTCOUNT('Tenants'[Tenant]),
KEEPFILTERS( YEAR('Tenants'[Date_Moved_In]) = 2025 ),
'Tenants'[Evicted] = "Yes"
)
RETURN
DIVIDE(Evicted2025, Tenants2025)
You will find the solution in the pbix file.
Put Financial_Year on a slicer or in the visual then use:
Eviction % (FY) =
VAR TenantsFY =
CALCULATE(
DISTINCTCOUNT('Tenants'[Tenant]),
REMOVEFILTERS('Tenants'[Evicted])
)
VAR EvictedFY =
CALCULATE(
DISTINCTCOUNT('Tenants'[Tenant]),
'Tenants'[Evicted] = "Yes"
)
RETURN
DIVIDE(EvictedFY, TenantsFY)
Hello !
You can use a measure :
Eviction % (2025) =
VAR Tenants2025 =
CALCULATE(
DISTINCTCOUNT('Tenants'[Tenant]),
KEEPFILTERS( YEAR('Tenants'[Date_Moved_In]) = 2025 ),
REMOVEFILTERS('Tenants'[Evicted])
)
VAR Evicted2025 =
CALCULATE(
DISTINCTCOUNT('Tenants'[Tenant]),
KEEPFILTERS( YEAR('Tenants'[Date_Moved_In]) = 2025 ),
'Tenants'[Evicted] = "Yes"
)
RETURN
DIVIDE(Evicted2025, Tenants2025)
You will find the solution in the pbix file.
EvictionRate2025 =
VAR Tenants2025 =
FILTER(
'Tenants',
YEAR('Tenants'[Date_Moved_In]) = 2025
)
VAR Total2025 = COUNTROWS(Tenants2025)
VAR Evicted2025 =
COUNTROWS(
FILTER(
Tenants2025,
'Tenants'[Evicted] = "Yes"
)
)
RETURN
DIVIDE(Evicted2025, Total2025, 0) * 100
This returns 57.14% as a numeric value. You can wrap it in FORMAT(..., "0.00%") if you want it styled as a percentage.
This is amazing, thank you. Sorry to be a pain, but how would I refer to a financial year if there is a column for that instead of the Date_Moved_In? The financial year is April-March, so the FY2025 result would be 66%.
| Tenant | Date_Moved_In | Evicted | Financial_Year |
| 1 | 01/10/2024 | Yes | FY2024 |
| 2 | 01/11/2024 | Yes | FY2024 |
| 3 | 01/02/2025 | No | FY2024 |
| 4 | 02/04/2025 | Yes | FY2025 |
| 5 | 03/04/2025 | Yes | FY2025 |
| 6 | 04/04/2025 | Yes | FY2025 |
| 7 | 05/04/2025 | Yes | FY2025 |
| 8 | 06/04/2025 | No | FY2025 |
| 9 | 07/04/2025 | No | FY2025 |
Thanks
you can createa a fy column
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.