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.
Hello all:
I know this must be easy in Power BI, but I can't seem to find the formula to do a large number of OR checks in my formula. Here's my situation.
I have a table containing data for 1000 part numbers. Let's pretend it looks like this:
PartNumber
00001
03756
17453 ... etc.
I would like to create a column based on a formula that says "If PartNumber is "44001" or "44032" or "68453" or... (for 34 specific part numbers)" then "Yes" else "No."
My challenge is that I have 34 PartNumbers that I need the formula to check for so that those 34 are "yes" in the new column and all others are "no."
What is the shortened formula to check if the PartNumber is in ("44001","44032","68453",...) without having to type 34 OR conditions?
Thank you.
Solved! Go to Solution.
Create column = IF(table[Part_number] in {10000,12245,...... so on},"YES","NO")
Incase your part number is in sequence then use
column = IF(table[Part_number]>=10000 && table[Part_number]<=10034 ,"YES","NO")
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
Create column = IF(table[Part_number] in {10000,12245,...... so on},"YES","NO")
Incase your part number is in sequence then use
column = IF(table[Part_number]>=10000 && table[Part_number]<=10034 ,"YES","NO")
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
Thank you very much!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
99 | |
88 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |