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.
I have two tables, as seen below:
The Customer (Parent) table contains:
The Purchase (Children) table contains:
This is a one-to-many relationship. The two tables are related by the Customer ID. I want to create a new column in the Customer table that contains a Boolean value reflecting if the Customer has any Purchase records. I tried LookupValue, but then receive an error when there are more than one Purchase record.
Solved! Go to Solution.
Hi, @Jeff2Jets
check this:
DidPurchase? =
var currentcustomer = Customer[customerID]
var checkPurchase = COUNTROWS(FILTER(Purchase, Purchase[customerID] = currentcustomer))
return if ( checkPurchase >= 1, TRUE(), FALSE())
Hi, @Jeff2Jets
check this:
DidPurchase? =
var currentcustomer = Customer[customerID]
var checkPurchase = COUNTROWS(FILTER(Purchase, Purchase[customerID] = currentcustomer))
return if ( checkPurchase >= 1, TRUE(), FALSE())
That was perfect, thanks!
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 |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |