Hello People,
I'm trying to group the columns Brand Name and Inspection date to get the highest date by brand. But I'm getting the error. Could anyone please review the code. It will be really great.
Input:-
Mercedes | 14/4/2000 |
Mercedes | 1/12/2006 |
Mercedes | 2/12/2020 |
BMW | 1/12/2018 |
BMW | 25/5/2018 |
BMW | 25/5/2019 |
Audi | 25/5/2018 |
Audi | 1/12/2019 |
Audi | 1/12/2020 |
Output:-
Mercedes | 2/12/2020 |
BMW | 25/5/2019 |
Audi | 1/12/2020 |
ClearCollect(myBrand,DropColumns(AddColumns(GroupBy(myBrandItems,"Vehicle_Brand","Date for Inspection"),"Brand Date",First(Sort(Brand_Details, Inspection_Date,Descending)).Inspection_Date)),"Date for Inspection")
Thanks 🙂
Solved! Go to Solution.
Hi @Tiksha ,
GroupBy() needs a "grouped" column - try the below
ClearCollect(
myBrand,
AddColumns(
GroupBy(
Sort(
myBrandItems,
Inspection_Date,
Descending
),
"Vehicle_Brand",
"Data"
),
"Brand Date",
First(Data).Inspection_Date
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @Tiksha ,
GroupBy() needs a "grouped" column - try the below
ClearCollect(
myBrand,
AddColumns(
GroupBy(
Sort(
myBrandItems,
Inspection_Date,
Descending
),
"Vehicle_Brand",
"Data"
),
"Brand Date",
First(Data).Inspection_Date
)
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
User | Count |
---|---|
255 | |
106 | |
85 | |
51 | |
43 |