Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jasonminhas
Frequent Visitor

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

jasonminhas_0-1652296027018.png

 

product_table

jasonminhas_1-1652296158815.png

 

sales_table

jasonminhas_2-1652296191006.png

 

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")
1 ACCEPTED SOLUTION

Hey Ibendlin, thanks for the feedback! I've reposted my question in the link below with additional clarity.

 

Trying to Create Column Using Data From Other Tabl... - Microsoft Power BI Community

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

You say boolean and then you mention three possible value (out of four) 🙂

 

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Hey Ibendlin, thanks for the feedback! I've reposted my question in the link below with additional clarity.

 

Trying to Create Column Using Data From Other Tabl... - Microsoft Power BI Community

Hi @jasonminhas ,

 

Have your problem been solved, if yes, please mark it and others can find it quickly.

Best Regards

Community Support Team _ chenwu zhu

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.