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

View all the Fabric Data Days sessions on demand. View schedule

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors