Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I am trying to understand how calculate overrides the filter context. Below, I have a very simple formula. The matrix visual at the top has the date from sales table. The one below has the data from the dates(calendar) table. Why does calculate override filter context only below and not in the one above? I was expecting the above table to also have the same values as below.
Solved! Go to Solution.
Hi @pankajsk83
The basic explanation is that filters apply to specific columns. Filters on 'Date'[Date] are distinct from filters on Sales[Order Date] even though there is a relationship between them.
This means that, when a filter argument for a particular column is specified in CALCULATE:
Using your example, assuming no other filters exist:
To avoid this kind of confusion, it is generally recommended to filter or group by columns of dimension tables only, not fact tables. In this particular case, I would suggest that Sales[Order Date] should be hidden and not included in any visuals, and instead just use columns of the 'Date' table (there may be exceptions to this).
Regards
Hi @pankajsk83
The basic explanation is that filters apply to specific columns. Filters on 'Date'[Date] are distinct from filters on Sales[Order Date] even though there is a relationship between them.
This means that, when a filter argument for a particular column is specified in CALCULATE:
Using your example, assuming no other filters exist:
To avoid this kind of confusion, it is generally recommended to filter or group by columns of dimension tables only, not fact tables. In this particular case, I would suggest that Sales[Order Date] should be hidden and not included in any visuals, and instead just use columns of the 'Date' table (there may be exceptions to this).
Regards
Owen, thank you this. Very crisp and clear explanation. Plus a good lesson here to group by columns of DIM tables only.
User | Count |
---|---|
20 | |
18 | |
17 | |
11 | |
7 |
User | Count |
---|---|
28 | |
27 | |
13 | |
12 | |
12 |