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.
I have a table that has entries like
AcctNum Code Answer DateTime
123456 Start1 1503 3/25/19 4:27PM
123456 End1 1752 3/25/19 8:55PM
123456 Start1 1510 3/25/19 5:15PM
I want to keep the row for each code/acctnum with the last datetime entry
In the above example it would only keep the last two rows.
Solved! Go to Solution.
I was able to get what I need creating a new table and then pulling the latest answer for each field name. I couldn't get anything else to work. I appreciate all the help tho. So many great ideas I will be using for other things.
Hi @kattlees ,
Based on my test, you could refer to below steps:
Add index for your data in query editor:
Apply it and use the Top N filter for your data table:
Regards,
Daniel He
Thanks for this, but I need to do it in the power query because I then pivot the table so each code has it's own column with just the latest value.
Hi @kattlees ,
You could refer to below link to use Keep rows function:
https://community.powerbi.com/t5/Desktop/Top-N-query-with-direct-query/td-p/236401
Regards,
Daniel He
Hey,
can you please explain the rule.why you just want to keep the last two rows?
Regards,
Tom
Our system saves a row each time a new entry is added for each code. So on one form, there could be 5 entries for the same code and account. The only one I care about is the last one entered.
I was able to get what I need creating a new table and then pulling the latest answer for each field name. I couldn't get anything else to work. I appreciate all the help tho. So many great ideas I will be using for other things.
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 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |