Forum Discussion
dhrubojtg
5 years agoFrequent Visitor
Power BI Filtering a column vs Filtering a table when is the difference apparent and when not
Power BI Filtering a column vs Filtering a table when is the difference apparent and when not Can some expert help me to make this clear in context to this example from DAX Definitive guide 2nd edit...
dhrubojtg
5 years agoFrequent Visitor
Anonymous Please comment if you have some time .Thanks
- daxer-almighty5 years agoSolution Sage
Your Case 1 can be written as:
EVALUATE ADDCOLUMNS( VALUES( 'Product'[Brand] ), "FilterCol", CALCULATE( [Sales Amount], FILTER( ALL( Sales[Quantity] ), -- this only filters one column Sales[Quantity] > 1 ) ), "FilterTab", CALCULATE( [Sales Amount], FILTER( Sales, -- this filters all the table BEFORE context transition Sales[Quantity] > 1 ) ) )Now, do you see the difference?
- dhrubojtg5 years agoFrequent Visitor
I forgot to mention sales amount measure defination i have updated in qn does your answer still hold good
- daxer-almighty5 years agoSolution Sage
In Case 2 you get what you get because there is no context transition for the measures as was in the case of ADDCOLUMNS. The filters are already in place when the measures get down to work.
- dhrubojtg5 years agoFrequent Visitor
I forgot to mention sales amount measure defination i have updated in qn does your answer still hold good