Forum Discussion
Latest Record in Group via Query Editor
Hi Marcel,
Thanks for your help and we believe we are close. The logic behind your code makes sense for what we are trying to accomplish; however, we are getting the following error trying to preview/expand the subtable of the grouped rows.
Expression.Error: The field 'SettleID-Statement_Group.statementDate' of the record wasn't found.
Any idea?
Also, should we be trying to select/filter on grouped rows at the query level (Query Editor) OR it is better to create a calculated table instead? If so, any suggestions on the DAX for the calculated table?
- MarcelBeug9 years agoCommunity Champion
Ah, I copied the code from your last line of code, but fields were renamed, so you shouldn't use 'SettleID-Statement_Group.statementDate', but just statementDate in the code I supplied.
The question about DAX or Power Query: my specialty is Power Query and I know little about DAX, so I'm pretty biased, but I think it's safe to state that you should use:
Power Query if you don't need to have the detailed data (before grouping) in your data model, while
DAX might be the better option if you need both the detailed and grouped information, as this will take into account any filter context.As I know little about DAX, others will be better able to help you with any DAX solution.