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.
Hi,
Based on the simple table table structure below can some show me an example of the dax forum that will show which salesperson last sold to that customer. It would be added as a column\measure to the customer table.
Thank you
Tony
Invoice
Solved! Go to Solution.
Hi, my alternative solution would be a measure like this:
LastSoldBy = CALCULATE ( VALUES ( Sales[SalesPerson] ), FILTER ( RELATEDTABLE ( Sales ), Sales[InVDate] = MAX ( Sales[InVDate] ) ) )
Hi
I think a new column with this formula should do what you want:
LastSoldBy = LOOKUPVALUE( Sales[SalesPerson]; Sales[InvDate];MAXX(RELATEDTABLE(Sales);Sales[InvDate]); Customers[CustomerID];Customers[CustomerID] )
I am sure there's a better solution and I am curious to see it myself. Anyway, I hope this helps for now.
JJ
Hi, my alternative solution would be a measure like this:
LastSoldBy = CALCULATE ( VALUES ( Sales[SalesPerson] ), FILTER ( RELATEDTABLE ( Sales ), Sales[InVDate] = MAX ( Sales[InVDate] ) ) )
Hi Victor
Thanks for sharing, your solution probably is faster!
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 |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |