Forum Discussion
Bansi008
Helper III
3 years agoneed help writing syntax for custom column
Hi All-- I have below sample data where I need to create a new custom column based on multiple conditional statements. Conditions :- 1 - If Sector equals to Non-G and A vs B equals to A and No. of ...
Igna
Resolver III
3 years agoHi,
You can try
New Column =
IF(
'Table'[Sector] = "Non-G" &&
'Table'[A vs B] = "A" &&
'Table'[No. of years] >= 0 && 'Table'[No. of years] <= 10,
"0-10 years",
IF(
'Table'[Sector] = "Non-G" &&
'Table'[A vs B] = "A" &&
'Table'[No. of years] > 10,
"Over 10 years",
IF(
'Table'[Sector] = "Non-G" &&
'Table'[A vs B] = "B",
"All Years",
IF(
'Table'[Sector] = "G" &&
'Table'[No. of years] >= 0 && 'Table'[No. of years] <= 5,
"0-5 years",
IF(
'Table'[Sector] = "G" &&
'Table'[No. of years] > 5 && 'Table'[No. of years] <= 15,
"5-15 years",
IF(
'Table'[Sector] = "G" &&
'Table'[No. of years] > 15,
"Over 15 years",
BLANK()
)
)
)
)
)
)
Hope it helps
Igna