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

Check if value is in a List

Hello everybody!

How can I find out if one of the selected values is a string?
What I tried out:

VAR SelectedKpi = SELECTEDVALUE(KPIs[Value])
return
IF(SelectedKpi IN {"SOE"},SUM(...),BLANK())

It works, but I select multiple values, it will only work for one at a time. 
I would like to be able to check if the string is into that variable.

Thanks!

1 ACCEPTED SOLUTION
daXtreme
Super User
Super User

You can put many values inside {...}, like {"A", "B", "C"}.

View solution in original post

2 REPLIES 2
v-binbinyu-msft
Community Support
Community Support

Hi @LucasFiorini ,

I'm a little confused about your needs, Could you please explain them further? It would be good to provide a screenshot of the results you are expecting.

Thanks for your efforts & time in advance.

 

Best regards,
Community Support Team_ Binbin Yu

daXtreme
Super User
Super User

You can put many values inside {...}, like {"A", "B", "C"}.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.

Top Solution Authors
Top Kudoed Authors