Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jbbr111
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
Sean
Community Champion
Community Champion

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

View solution in original post

1 REPLY 1
Sean
Community Champion
Community Champion

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.