Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
20 | |
18 | |
18 | |
15 |
User | Count |
---|---|
38 | |
20 | |
19 | |
16 | |
10 |