cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbbr111 New Member
New Member

Dax Filter - Two values in the filter from same column not rendering

YTD New TIV Policy Effective Date :=
CALCULATE (
    SUM ( 'FactPolicyCoverage'[CoverageAmount] ),
    DATESYTD ( 'PolicyEffectiveDimDay'[PolicyEffectiveDayDate] ),
    'DimNewRenewal'[NewRenewalStatus] = "New",
    FILTER (
        'DimCoverageLimit',
        'DimCoverageLimit'[CoverageLimitDescriptionName]
            = "Building & Business Personal Property Limit"
            && 'DimCoverageLimit'[CoverageLimitDescriptionName] = "Business Income Limit"
    )
)

Trying to filter a column with more then one value being filtered -  tried using calculatetable and Filter

If I eliminate one of the values in the filter or in the calculatetable  it works -  it does not work with two

what am I dong wrong

 

New to Dax

 

Thanks for any help

1 ACCEPTED SOLUTION

Accepted Solutions
Sean Super Contributor
Super Contributor

Re: Dax Filter - Two values in the filter from same column not rendering

Change the && to || Smiley Happy

 

YTD New TIV Policy Effective Date :=
CALCULATE (
    SUM ( 'FactPolicyCoverage'[CoverageAmount] ),
    DATESYTD ( 'PolicyEffectiveDimDay'[PolicyEffectiveDayDate] ),
    'DimNewRenewal'[NewRenewalStatus] = "New",
    FILTER (
        'DimCoverageLimit',
        'DimCoverageLimit'[CoverageLimitDescriptionName]
            = "Building & Business Personal Property Limit"
            || 'DimCoverageLimit'[CoverageLimitDescriptionName] = "Business Income Limit"
    )
)

Its the same column it can't have both values at the same time but it can be either OR

 

Hope this helps! Smiley Happy

1 REPLY 1
Sean Super Contributor
Super Contributor

Re: Dax Filter - Two values in the filter from same column not rendering

Change the && to || Smiley Happy

 

YTD New TIV Policy Effective Date :=
CALCULATE (
    SUM ( 'FactPolicyCoverage'[CoverageAmount] ),
    DATESYTD ( 'PolicyEffectiveDimDay'[PolicyEffectiveDayDate] ),
    'DimNewRenewal'[NewRenewalStatus] = "New",
    FILTER (
        'DimCoverageLimit',
        'DimCoverageLimit'[CoverageLimitDescriptionName]
            = "Building & Business Personal Property Limit"
            || 'DimCoverageLimit'[CoverageLimitDescriptionName] = "Business Income Limit"
    )
)

Its the same column it can't have both values at the same time but it can be either OR

 

Hope this helps! Smiley Happy

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Ideas
Users Online
Currently online: 44 members 964 guests
Please welcome our newest community members: