Yash
Yash

Reputation: 97

Power BI DAX Filter(): load only single column without affecting any filter

I have a dax measure, which is calculating the sum of values from the accountcommon table which meets the condition:

Term Growth/Increase = CALCULATE([Variance (Organic Loan)],FILTER(AccountCommon,[Variance (Organic Loan)]>0))

Currently, Power Bi is loading the whole AccountCommon Table in the filter expression, whereas I just want to filter the data based on only a single column AccountCommon[AccountNumber]

Can anyone please help me understand if it's possible to load only a single column in the filter expression without affecting any filter?

Upvotes: 0

Views: 2462

Answers (1)

Alexis Olson
Alexis Olson

Reputation: 40244

Try

Term Growth/Increase =
CALCULATE (
    [Variance (Organic Loan)],
    FILTER ( ALL ( AccountCommon[AccountNumber] ), [Variance (Organic Loan)] > 0 )
)

or

Term Growth/Increase =
CALCULATE (
    [Variance (Organic Loan)],
    FILTER ( VALUES ( AccountCommon[AccountNumber] ), [Variance (Organic Loan)] > 0 )
)

depending on whether you want to preserve existing filter context on that column or not.

Upvotes: 1

Related Questions