Forum Discussion
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:
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.
7 Replies
- Sibrulotte
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.
- lbendlin
Super User
Remember you have CROSSFILTER at your disposal which allows you to temporarily change the filter directions.
- lbendlin
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.
- Sibrulotte
Helper IV
you mean like this:
NB_epargnant_31_mai_comp =
var vLastyear_end_of_year_date =
date(max(master_calender.fiscal_year), 05,31)-365returncalculate(distinctcount(Balances[Balances.Customer_ID]), removefilters(Master_calender), filter(balances, Balances[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.
- lbendlin
Super User
var vLastyear_end_of_year_date =
edate(max(master_calender.fiscal_year), -12)