Hi all. I'm having issues using data typed as Lookup in a GroupBy for aggregation. I've checked the other related posts on the board, but they seem to be pretty specific to their scenario, and I'm not good enough yet to get them to apply to my case. Datasource is Dataverse.
The GroupBy formula I have, which will be used as the Items property in a gallery, is as follows:
AddColumns(
GroupBy(
Filter('Time Entries','Time Entries (Views)'.'Time Entries for Approval',Date > VarSelectedStartDate && Date < VarSelectedEndDate),
"'Bookable Resource'.Name","Project.'Project Name'", "Date", "Prj Data"),"Hours",Sum('Prj Data',Duration))
However, 'Bookable Resource'.Name and Project.'Project Name' are data type Lookup. I'd imagine the solution would involve nested AddColumns to create a "new" value for Resource Name and Project Name that can be referenced in the GroupBy, but that's beyond my current skill level. Can anyone assist?
A side question: can I encode 'Time Entries','Time Entries (Views)'.'Time Entries for Approval' into a variable for easier and more efficient use in formulas? Something similar to using VAR in Power BI measures.
I've had a lot of questions on here lately, and I anticipate having more, but people have been incredibly helpful, so thanks to everyone.