Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have been trying to add calcualted columns in Power BI but I keep getting it wrong. Does anyone know how to create a calcualted colum that is based on IFs and Ors like the following?
If (Table[value1] IN ("ABC","DEF,"GHI") AND Table[value2] = 200 ) THEN
'Type A'
Else If (
(Table[value1] = "GGG" AND Table[value2] IN (100,300) )
)
OR
(
(Table[value1] = "III"
)
THEN
'Type B'
Else
'Type C'
End If
Thanks
John
Solved! Go to Solution.
try
Column =
IF (
'Table'[value1] IN { "ABC", "DEF", "GHI" }
&& 'Table'[value2] = 200,
"Type A",
IF (
'Table'[value1] = "GGG"
&& 'Table'[value2] IN { 100, 300 },
"Type B",
"Type C"
)
)
try
Column =
IF (
'Table'[value1] IN { "ABC", "DEF", "GHI" }
&& 'Table'[value2] = 200,
"Type A",
IF (
'Table'[value1] = "GGG"
&& 'Table'[value2] IN { 100, 300 },
"Type B",
"Type C"
)
)
Hi,
Thanks for your reply - that worked.
Thanks
John
By the way, you may help accept solution. Your contribution is highly appreciated.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 73 | |
| 50 | |
| 46 | |
| 44 |