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.
Hey everyone,
I have two related tables, one with person's information another with all transactions for all people. The tables have the following structure:
Person's Info
Name | Country | Address |
Michael | Poland | Address 1 |
Max | Spain | Address 2 |
Mona | Croatia | Address 3 |
Transaction Info
Name | Bought from | Date |
Michael | Amazon | 01.01.2020 |
Michael | Coffeeshop | 01.02.2020 |
Max | Amazon | 01.01.2020 |
Max | eBay | 01.01.2020 |
I want to add a conditional column "Drinks coffee" to the "Person's info" table which will say "Yes" if a person bought from "Coffeeshop" at any date, otherwise "No". [So, in this example Michael will have "Yes", Max and Mona will have "No"]
Thank you in advance!
Solved! Go to Solution.
Hi @Anonymous
If you have a relationship through "Name":
New Column =
IF (
CALCULATE (
COUNT ( TransactionT[Name] ),
TransactionT[Bought from] = "Coffeeshop"
) > 0,
"Yes",
"No"
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi,
I am not sure how to do this on DAX. But you can merge tables in Power Query and then create a conditionnal column.
Good day
Hi @Anonymous
If you have a relationship through "Name":
New Column =
IF (
CALCULATE (
COUNT ( TransactionT[Name] ),
TransactionT[Bought from] = "Coffeeshop"
) > 0,
"Yes",
"No"
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |