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 All,
I have a table with columns Sold-to Party (unique customer number) and Party Name (customer name which is not unique and more than one customer number may share the same Party Name). The latter changes over time while the former remains the same. My data source is a business warehouse (sort of a data dump) that doesn't retroactively change the past data when, say, a field like Party Name gets updated. What I'm trying to accomplish is return the latest Party Name based on the latest invoice date of Sold-to Party. I created this measure to get the max date:
maxinvoicedate = CALCULATE ( MAX ( 'WW Invoiced Orders'[Billing Date] ), ALLEXCEPT ( 'WW Invoiced Orders', 'WW Invoiced Orders'[Sold-to Party] ) )
And then this DAX formula to create a calculated table.
Unique Partners = CALCULATETABLE ( ALL ( 'WW Invoiced Orders'[Sold-to Party], 'WW Invoiced Orders'[Partner Name] ), FILTER ( 'WW Invoiced Orders', 'WW Invoiced Orders'[Billing Date] = [maxinvoicedate] ) )
The formulas don't work like I want them to. The calculated table returns Sold-to Party and all Partner Names related to it instead of the latest one. For example, if the max date is 6/28/17, the calculated table should return just the Partner Name for that date. Also it is highly unlikely to have more than one Party Name under the same Sold-to Party on the same date.
I
Proud to be a Super User!
Solved! Go to Solution.
Use RANKX Function instead. Here is a similar case for your reference.
Use RANKX Function instead. Here is a similar case for your reference.
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 |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |