Compare data from two tables // Enum values based on two columns

Hi,

I have two questions, unfortunately I’m not able to figure out how to do that,

I have two tables, Matches and Bets:
In Matches are following columns: match_id, name1, name2, winner
In Bets are are following columns: bet_id, match_id, username, bet

  1. I would like to check if username has a correct bet by comparison value winner from Matches table and value bet from Bets table.

I created virtual columns in Bets IN([Bet],Matches[Winner]), unfortunately in case the winner is in the Matches more than once it will get wrong results.

  1. I would like to have a Enum for Winner based on the name1 and name2 column, how can I do that?

Thank you in advance

3 Likes

Hi Marc,

thank you, dropdown from valid_if helped me with second question.

Unfortunately I have still issue with the first one.

Edit: I solved it with lookup function.

1 Like