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.
Hello!
I have two tables setup called, "Customer / Lead" and "Estimate." I have setup a relation ship between the two based on a Customer / Lead field. This values in this field have to be uniqe. A customer and or lead can have multple estimates to them.
My goal is to setup two columns in the Customer / Lead table with the most recent due date and estimate#. If the customer / lead does not have an estimate, I want it to show up as a N/A.
Here is an example of the Customer / Lead Table
Customer / Lead Customer A
Lead B
Customer C
Here is an example of the Estimate Table
Estimate # Customer DueDate 1007 Customer A 2/26/2019
1001 Customer A 3/27/2019
1027 Customer A 1/15/2019
2000 Customer C 2/27/2019
My goal would be for the Customer / Lead table to look like this:
Customer / Lead Most Recent Estimate# Most Recent Estimate Due Date
Customer A 1001 3/27/2019
Lead B N/A N/A
Customer C 2000 2/27/2019
If I need to clarify anything, I would be more then happy to! Thanks.
Solved! Go to Solution.
Hi @Anonymous ,
I'm afraid you'd better create the measure with the formulas below.
Most Recent Estimate Due Date = VAR a = CALCULATE ( MAX ( 'Table1'[DueDate] ), FILTER ( 'Table1', 'Table1'[Customer] = MAX ( 'Table1'[Customer] ) ) ) RETURN IF ( ISBLANK ( a ), "N/A", a ) Most Recent Estimate# = VAR a = CALCULATE ( MAX ( 'Table1'[Estimate#] ), FILTER ( 'Table1', 'Table1'[DueDate] = MAX ( 'Table1'[DueDate] ) && 'Table1'[Customer] = MAX ( 'Table1'[Customer] ) ) ) RETURN IF ( ISBLANK ( a ), "N/A", a )
Here is the output.
Best Regards,
Cherry
Hello!
I have two tables setup called, "Customer / Lead" and "Estimate." I have setup a relation ship between the two based on a Customer / Lead field. This values in this field have to be uniqe. A customer and or lead can have multple estimates to them.
My goal is to setup two columns in the Customer / Lead table with the most recent due date and estimate#. If the customer / lead does not have an estimate, I want it to show up as a N/A.
Here is an example of the Customer / Lead Table
Customer / Lead Customer A
Lead B
Customer C
Here is an example of the Estimate Table
Estimate # Customer DueDate 1007 Customer A 2/26/2019
1001 Customer A 3/27/2019
1027 Customer A 1/15/2019
2000 Customer C 2/27/2019
My goal would be for the Customer / Lead table to look like this:
Customer / Lead Most Recent Estimate# Most Recent Estimate Due Date
Customer A 1001 3/27/2019
Lead B N/A N/A
Customer C 2000 2/27/2019
If I need to clarify anything, I would be more then happy to! Thanks.
Hi @Anonymous ,
I'm afraid you'd better create the measure with the formulas below.
Most Recent Estimate Due Date = VAR a = CALCULATE ( MAX ( 'Table1'[DueDate] ), FILTER ( 'Table1', 'Table1'[Customer] = MAX ( 'Table1'[Customer] ) ) ) RETURN IF ( ISBLANK ( a ), "N/A", a ) Most Recent Estimate# = VAR a = CALCULATE ( MAX ( 'Table1'[Estimate#] ), FILTER ( 'Table1', 'Table1'[DueDate] = MAX ( 'Table1'[DueDate] ) && 'Table1'[Customer] = MAX ( 'Table1'[Customer] ) ) ) RETURN IF ( ISBLANK ( a ), "N/A", a )
Here is the output.
Best Regards,
Cherry
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |