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...
daxer-almighty
5 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?
dhrubojtg
5 years agoFrequent Visitor
I forgot to mention sales amount measure defination i have updated in qn does your answer still hold good