I'm managing tenant payments in my building and keep track of tenant details in a tenants table, with each payment recorded in a sales table. Currently, there is no system for tracking or predicting the status of future payments.
I’m trying to create two visualizations in Power BI using DAX:
A table showing tenants who have made their payments for a selected month and year. A table showing tenants who have not made their payments for the same period. However, I'm facing an issue with the filters in these visualizations. When I apply a filter for a specific month, such as January 2025, the visualizations do not show complementary groups of tenants.
Example: For January 2025, Joe and Aster have made their payments. The first visualization correctly displays Joe and Aster. However, the second visualization, which should show tenants who haven't paid (Kenny and Eric), fails to display them when the same filter is applied.
How can I use DAX in Power BI to accurately display both groups of tenants based on their payment status for any given month?
TenantsWithoutPayments =
CALCULATETABLE (
VALUES ( Customer_tb[aptID] ),
NOT (
CALCULATE (
COUNTROWS ( Sales_tb ),
Sales_tb = Customer_tb[aptID]
)
)
)