Valid if question

If I have a column  for county and one for year built (needs to be greater than or equal to 1994), how can I have a 3rd column return a specific list of values?

So if a house is located in [Broward] county and was built in [1994 or newer] only "option c "will show in a 3rd column.

IF([County]=Broward, [List("B","C"),LIST(โ€œA","E"))

IF([Year Built]=1994, [List("C"),LIST(โ€œA","B","E"))

Not sure how to combine the 2 expressions or how to express greater than or equal to for the year

Thanks in advance!

Solved Solved
0 2 82
1 ACCEPTED SOLUTION

IF(AND([County] = "Broward", [Year] >= 1994), LIST("C"), LIST("A", "B", "E"))

If you have a long or complex list of county and year combinations that govern which values should be listed in another column, consider making that list a table itself. Then, you could create an expression to look up the value. For example:

SELECT(CountyYearTable[Column with list of values], AND([County] = [_THISROW].[County], [Year] = [_THISROW].[Year])

 

View solution in original post

2 REPLIES 2

IF(AND([County] = "Broward", [Year] >= 1994), LIST("C"), LIST("A", "B", "E"))

If you have a long or complex list of county and year combinations that govern which values should be listed in another column, consider making that list a table itself. Then, you could create an expression to look up the value. For example:

SELECT(CountyYearTable[Column with list of values], AND([County] = [_THISROW].[County], [Year] = [_THISROW].[Year])

 

You are the bomb๐Ÿ’ฃ

Thank you!

Top Labels in this Space