Forum Discussion

jasonminhas's avatar
jasonminhas
Frequent Visitor
4 years ago
Solved

Trying to Create BOOL Column Using Data From Other Tables

My objective is to create three True/False columns in the account_table that identifies whether the account has purchased the "New", "Old" or both products based on the "Product Tag" column in the product_table. You can see I've written in the "Notes" column of the account_table what the customer purchased manually. How can I create a calculated column to do this?

 

account_table

 

product_table

 

sales_table

 

What I've tried:

I tried to use an if statement but the intellsense is not giving me the option to select the product_table. I also tried the CALCUATE function below to see if I can get it to return True for just accounts that ordered "Product A" but that was showing them all as True when it should've just been True for "Account ID" 100 since thats the only account that ordered "Product A".

 

CALCULATE(TRUE(),sales_table[Product ID]= "Product A")

3 Replies