Any idea how to solve this , its in the same area of what i looking for .
I want to display in the table all 'Klass_Elev' with each 'Title' summarized per
'Kontrakt'; CountIf(GroupedLoggadeAPLelever[@GroupedBesokstyp]; Besokstyp = 'Kontrakt');
Down to ToT .
I realize that it's failing in the grouping, but I can't come up with the solution."
My code is below
// This code collects data and groups it by "Klass_Elev".
// For each group of "Klass_Elev", it adds a column titled "Title",
// retrieving each title separately from each group.
ClearCollect(
GroupedLoggadeAPLelever;
// Save the grouped data in a collection named GroupedLoggadeAPLelever
AddColumns(
// Add columns to the grouped data
GroupBy(
// Group the data by a specified column ("Klass_Elev") and an associated grouped column ("GroupedBesokstyp")
YGLoggat;
// The data source to be grouped
"Klass_Elev";
// The column to be grouped by
"GroupedBesokstyp"
// The name of the newly grouped column
);
"Title"; GroupedBesokstyp.Title
// Add a column titled "Title" and retrieve each unique title separately for each group of "Klass_Elev"
)
);
// This code counts the occurrences of different visit types for each group of "Klass_Elev".
ClearCollect(
RaknaYGLoggat;
// Save the counted data in a collection named RaknaYGLoggat
AddColumns(
// Add columns to the grouped data
GroupedLoggadeAPLelever;
// Use the previously created grouped data as the base
"Kontrakt"; CountIf(GroupedLoggadeAPLelever[@GroupedBesokstyp]; Besokstyp = "Kontrakt");
// Count the occurrences of "Kontrakt" for each group of "Klass_Elev"
"3-Partsamtal"; CountIf(GroupedLoggadeAPLelever[@GroupedBesokstyp]; Besokstyp = "3-Partsamtal");
// Count the occurrences of "3-Partsamtal" for each group of "Klass_Elev"
"APL besök"; CountIf(GroupedLoggadeAPLelever[@GroupedBesokstyp]; Besokstyp = "APL besök");
// Count the occurrences of "APL besök" for each group of "Klass_Elev"
"Bombesök"; CountIf(GroupedLoggadeAPLelever[@GroupedBesokstyp]; Besokstyp = "Bombesök");
// Count the occurrences of "Bombesök" for each group of "Klass_Elev"
"Telefon"; CountIf(GroupedLoggadeAPLelever[@GroupedBesokstyp]; Besokstyp = "Telefon");
// Count the occurrences of "Telefon" for each group of "Klass_Elev"
"ToT"; CountIf(GroupedLoggadeAPLelever[@GroupedBesokstyp]; Besokstyp = "Kontrakt" || Besokstyp = "Telefon" || Besokstyp = "3-Partsamtal" || Besokstyp = "APL besök" || Besokstyp = "Bombesök")
// Count the total occurrences of specified visit types for each group of "Klass_Elev"
)
)
The outcone in excel this is what i need to solve
