Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
For technical reasons and general difficulty dealing with SAP BW as a datasource, I have a table modeled as a DAX UNION statement that glues together about 10 tables. That resulting table has duplicates and I'd like to keep the one with the most recent date. In Power Query, it is a straight forward "Group By", but it is not obvious in DAX
How can I achieve keeping rows based on an ID and where the date = the Max Date of that ID in DAX?
The table:
Solved! Go to Solution.
Within the advanced editor, sort by `TECO Date`, in your case descending order. Then click on the carrot in your id column and click on what I believe is just called remove duplicates
It wouldn't let me respond in thread, so:
That makes sense.
I like the summarize function. You could try someting like this:
SUMMARIZE (
TableName,
TableName[Key],
"Date", MAX(TableName[TECO Date]),
"NextCol", TableName[NextCol]
)
Within the advanced editor, sort by `TECO Date`, in your case descending order. Then click on the carrot in your id column and click on what I believe is just called remove duplicates
It wouldn't let me respond in thread, so:
That makes sense.
I like the summarize function. You could try someting like this:
SUMMARIZE (
TableName,
TableName[Key],
"Date", MAX(TableName[TECO Date]),
"NextCol", TableName[NextCol]
)
I ended up using GROUPBY(TableName, Key, MAXX(CURRENTGROUP(), 'TECO Date'), ....), but your answer is pretty much the same thing. Thank you for the diligent response
Can't do this. Each of the tables are separate in M/Power Query. The final table is made in DAX with a Union statement. Doing this would eliminate duplicates withing individual talbes bu tnot across all tables
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
141 | |
75 | |
64 | |
52 | |
47 |
User | Count |
---|---|
219 | |
89 | |
73 | |
66 | |
60 |