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 am trying to create a new calculated column base on multiple text criteria conditions.
The critieria is if Product Type is not A or B and starts with Description: "xyz", "qss,si", "prc", "aj,prc" assign the numeric value 1 otherwise assign 0.
The result should be:
Product Type | Description | New calculated Column |
A | HDMI | 0 |
B | sirte | 0 |
C | PD | 0 |
D | HD | 0 |
E | qss,si | 1 |
F | aj,prc | 1 |
G | xyz | 1 |
How would this be written? Thanks.
Solved! Go to Solution.
There you go:
New Calculated Column = IF ( NOT ( Table[Product Type] IN { "A", "B" } ) && ( LEFT ( Table[Description], 3 ) = "xyz" || LEFT ( Table[Description], 6 ) = "qss,si" || LEFT ( Table[Description], 3 ) = "prc" || LEFT ( Table[Description], 6 ) = "aj,prc" ), 1, 0 )
There you go:
New Calculated Column = IF ( NOT ( Table[Product Type] IN { "A", "B" } ) && ( LEFT ( Table[Description], 3 ) = "xyz" || LEFT ( Table[Description], 6 ) = "qss,si" || LEFT ( Table[Description], 3 ) = "prc" || LEFT ( Table[Description], 6 ) = "aj,prc" ), 1, 0 )
Thanks!!
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 |
---|---|
111 | |
94 | |
82 | |
66 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |