Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
125 | |
106 | |
99 | |
63 | |
62 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |