Forum Discussion
Fetching a related max date for comparison
Hi! I think you misunderstood me, this provides the same answer. What I need is for START_DATE and END_DATE to be the max date value from F Product for the specific customer being evaluated in the final expression.
- Mahesh00163 years ago
Super User
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- Anonymous3 years agoNot applicable
Unfortunately I can't share any data due to company policy. However I can give you some sample tables to show you what I mean:
PRODUCT TABLE
Customer Date purchased 1 January 1st 2 January 10th 3 January 17th ACTIVITY TABLE
Customer Date contacted 1 January 2nd 2 January 7th 3 January 15th Here, the contacted date for customer 2 & 3 comes before the purchase date, meaning I want to count them so expected output should be 2. However, currently the model does not take the max purchase date per customer and compares it to the activity table, but rather takes the max purchase date in the product table overall, being January 17th. This makes the output 3 instead of 2.
Note: Both of these are fact tables in my model so they can't have a direct, active relationship.