Hello guys,
This is a little hard to explain but here we go, I've made this concept:
OnSelect().Button:
ClearCollect(exampleCol;
{Item: "Car type A"; Speed: 250; Transmission: "manual"};
{Item: "Car type A"; Speed: 237; Transmission: "automatic"};
{Item: "Car type A"; Speed: 250; Transmission: "manual"};
{Item: "Car type A"; Speed: 215; Transmission: "automatic"};
{Item: "Car type B"; Speed: 115; Transmission: "manual"};
{Item: "Car type B"; Speed: 103; Transmission: "automatic"};
{Item: "Car type B"; Speed: 168; Transmission: "manual"};
{Item: "Car type B"; Speed: 159; Transmission: "automatic"}
);;
ClearCollect(resultExampleCol;
Sort(
AddColumns(
GroupBy(
exampleCol;
"Item";
"Speed";
"Transmission";
"mostOften"
);
"total";
CountRows(mostOften)
);
total;
SortOrder.Descending
));;
The first part is self explanatory, i'm collecting a few values, note for the 2 repeated one "type A/250/manual".
The second part I calculate the most recurrent value and group into a single row, this is the result:
Gallery().Items = resultExampleCol:

The thing that I want to do here, it's calculate the average speed between the 3 Car type, in this case the result should be something like:
Car Type A / avg speed: XX / manual
Car Type A / avg speed: XX / automatic
Car Type B / avg speed: XX / manual
Car Type B / avg speed: XX / automatic
Car Type A / avg speed: XX / manual
Car Type A / avg speed: XX / automatic
I would apreciate if someone can give me a hand on this,
Thanks!