Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
daicaboy
Frequent Visitor

Removefilters with active relationship not working with Date

Hello everyone,

I have a problem when use removefilter. The total is right but some row value don't show in the report. I had a Table 1 with Product and ID have active relationship with ID in Table 2. And the Calendar Table have active relationship with Fix Date in Table 2. I want to count Product fix within a year and have Date warranty less than 3 year, and both date from the  Year and Month Visual with date in Calendar Table.

Table1:

IDProduct
RNAProduct A
SSPProduct A
ATSProduct B
CTSProduct C
RSFProduct C

 

Table 2:

IDFix DateWarranty Date
RNA31/03/202502/05/2025
RNA15/03/202502/05/2025
RNA01/02/202502/05/2025
RNA14/12/202402/05/2025
RNA03/05/202402/05/2025
SSP03/05/202201/03/2021
SSP12/09/202401/03/2021
SSP24/08/202401/03/2021
CTS03/04/202502/05/2019
CTS01/01/202402/05/2019
CTS05/06/202402/05/2019
CTS28/04/202502/05/2019
CTS14/06/202102/05/2019
RSF01/05/202305/04/2022

The result of Total is right, but it didn't show all the product. Because my data with over 15 million row so I just show the example of my result.
Here the result I got. As you can see the Total show all the Qty but Row only show Product A and B, Product C is missing.

ProductQty
Product A1
Product B3
Total10

 

The Right result should be:

ProductQty
Product A1
Product B3
Product B6
Total10

When I tried Inactive relationship between Calendar and Table2 and Delete REMOVEFILTERS It's work fine and show the Product C.

Here my DAX:

Product Count = 
VAR DateVisual = MAX('Calendar'[Date])
VAR DateCount = EOMONTH(DateVisual,-12)+1
VAR DateShow = CALCULATE(MAX('Table2'[Fix Date]))
VAR ProductCount =
    CALCULATE(
        DISTINCTCOUNT('Table2'[ID],
        FILTER(
            ALL('Table2'[Fix Date],'Table2'[Warranty Date]),
            'Table2'[Fix Date] >= DateCount &&
            'Table2'[Fix Date] <= DateVisual &&
            NOT ISBLANK('Table2'[Warranty Date])&&
            'Table2'[Warranty Date] >= EOMONTH(DateVisual, -36) + 1
        ),
        REMOVEFILTERS('Calendar')
    )
RETURN
IF(DateVisual <= DateShow, ProductCount, BLANK())

My data are heavy, I need active relationship and use one Calendar Table to calculate other, so I can't create a new Calendar or add USERELATIONSHIP.

Thanks.


Thanks.

6 REPLIES 6
daicaboy
Frequent Visitor

Hi,
I need to count how many product satisfy 2 conditions: have fix date less than a year from visual Calendar and waranty date less than 3 year from the visual. Some month work fine, but some month it missing some product. Like It's show Total 10, but only show Product A: 1, Product B: 3, missing Product C. And when I'm inactive and don't use REMOVEFILTERS it show product C: 6. So How to show right Result Product C: 6 when I active the relationship.
Example issue:

daicaboy_0-1750919369235.png

But the right result should be 

daicaboy_1-1750919408041.png

 


Thanks.

I understand but in the data you provided there is no product B, can you please check my results and tell me which is incorrect? I cannot get your result if I have no product B

Oh so sorry, because big data so I only copy some of them for easy to imagine. As I said I dont understand why Total is 10 but It only show product A: 1 and B: 3. I can make sure that my data not missing product C because when I tried inactive it and delete REMOVEFILTERS, it's will show product C.

Ok but with the data you provided, are my results correct from your point of view? otherwise we never get to a point

 

Best

FB

Yes, It is right. Thank

FBergamaschi
Resolver I
Resolver I

Hi, attached the result I have based on your data

 

2025-06-26_08-01-52.png

To my view the result is correct, there is no product B in the data you provided and with the warranty dates in the tabe it seems to me it works

 

Can you tell which result is wrong and what shoud that be?

 

Best

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.