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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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