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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Sibrulotte
Helper IV
Helper IV

Trouble with Removefilters, yet another

Hi, 

I have a master calender connected to my transactions table, that is connected to a customer table that is connected to a balance table.

 

My measure should look like this:

 

NB_epargnant_31_mai_comp = calculate(distinctcount(Balances[Balances.Customer_ID]), removefilters(Master_calender), filter(balances, Balances[Balance_date] = [Lastyear_end_of_year_date])).
 
So basically, it should retrieve the number of customers I have last year at a specific date ([Lastyear_end_of_year_date] returns a single value), with disregard to any selections made to the master calender to avoid keeping only customers with transaction in the selected period.
 
Unfortonatly, my measure returns filtered resultats anyways 😞
What should I tweak?
1 ACCEPTED SOLUTION
Sibrulotte
Helper IV
Helper IV

Well after reviewing and recreating my model a few times over, it was a relationship between two tables that prohibits what I want to do and I'm stuck keeping the bi directionnal relationship for a greater purpose.

 

Oh well, I've hit the end of my will to add this to my model. Thank you for your patience.

View solution in original post

7 REPLIES 7
Sibrulotte
Helper IV
Helper IV

Well after reviewing and recreating my model a few times over, it was a relationship between two tables that prohibits what I want to do and I'm stuck keeping the bi directionnal relationship for a greater purpose.

 

Oh well, I've hit the end of my will to add this to my model. Thank you for your patience.

Remember you have CROSSFILTER  at your disposal which allows you to temporarily change the filter directions.

lbendlin
Super User
Super User

 ([Lastyear_end_of_year_date] returns a single value)

If it does then materialize it into a variable instead of computing the measure for every row.

you mean like this:

 

NB_epargnant_31_mai_comp = 

var vLastyear_end_of_year_date = 

date(max(master_calender.fiscal_year), 05,31)-365
return

calculate(distinctcount(Balances[Balances.Customer_ID]), removefilters(Master_calender), filter(balancesBalances[Balance_date] = vLastyear_end_of_year_date))

 

BTW  this : date(max('Année comptable'[Année comptable]), 05,31)-365 returns th eproper date I am looking for : 2024-05-31 and when I remove selections in my page I get the proper result.

var vLastyear_end_of_year_date = 

edate(max(master_calender.fiscal_year), -12)

Cool.

Still not really what's causing the problem. If you have any idea on why there are still filters applied when I put my measure in objects, I'd be super greatful.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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