In my attribute table, I have 9 columns providing information on the same thing (group ID). One row does only have one group ID. I.e. one row has a group ID in one of these 9 columns, in the other columns it says 0. I need to have one column with the group ID information (an 8-10 digit number) for all rows. I have tried coalesce function, but it is (in it's pure form) not the right function for this, as each column has a number (i.e. 0 if not a group ID). Thus, the coalesce function provides me with the exact same column as the first stated column.
Is there any way to use the coalesce function but with a condition? E.g. something like:
Coalesce ("Group_ID" if > 0, "Group_ID_1" if > 0, "Group_ID_2" if > 0, "Group_ID_3" if > 0 )
Or, is there any other way to do this?