最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

powerbi - Handling Complementary Filters in DAX - Stack Overflow

programmeradmin10浏览0评论

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]
        )
    )
)
发布评论

评论列表(0)

  1. 暂无评论