Forum Discussion
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
Change the && to || :smileyhappy:
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! :smileyhappy:
1 Reply
- SeanCommunity Champion
Change the && to || :smileyhappy:
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! :smileyhappy: