cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User III
Super User III

Re: How to use filter with multiple values in DAX?

Hey @Dlan1 ,

 

maybe this measure will provide what you are looking for:

TotalFires = 
SUMX(Query1,
IF(Query1[INCIDENT_CATEGORY] IN 
{"Accidental Dwelling Fire",
"Accidental Non Domestic Fire",
"Accidental Other Primary Fire",
"Accidental Vehicle Fire",
"Accidental Small Fire",
"Chimney Fire",
"Deliberate Dwelling Fire",
"Deliberate Non Domestic Fire",
"Deliberate Small Fire",
"Deliberate Other Primary Fire",
"Deliberate Vehicle Fire"}
, 1 , BLANK())
)

If this does not solve your problem, please start a new question.

The error is due to the fact that COUNTX is not able to count BOOLEANs, a boolean is returned by column IN {...}


Regards,
Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
Highlighted
Regular Visitor

Re: How to use filter with multiple values in DAX?

@TomMartens

 

 

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors