The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm trying to create a group by table per date and client. All the other columns are fine other than the "On Time Packages" column
This is for column On Time, with shows for each package a 0 if it was on time and 1 if it was late. The column is number type and there are no null values.
I've tried numerous different things to try to get this to work: even created another column to try the same thing by creating a Y for on time and N for late and trying to count the Ys and that still doesn't work. Please help!!
Table.Group(
#"Added Custom",
{"package_date"},
{
{"Overall Delay", each List.Sum([Delay in mins]), type number},
{"Average Delay", each List.Median([Delay in mins]), type number},
{"On Time Packages", each List.Sum(List.Select([On Time ], each _ =0)), type nullable number},
{"Total Packages", each Table.RowCount(_), type number}
}
)
Solved! Go to Solution.
Hello @E_K_,
It looks like you're on the right track with your approach to grouping in Power Query.
Here's a slightly revised version of your query:
Table.Group(
#"Added Custom",
{"package_date"},
{
{"Overall Delay", each List.Sum([Delay in mins]), type number},
{"Average Delay", each List.Average([Delay in mins]), type number},
{"On Time Packages", each List.Count(List.Select([On Time], each _ = 0)), type number},
{"Total Packages", each Table.RowCount(_), type number}
}
)
Hello @E_K_,
It looks like you're on the right track with your approach to grouping in Power Query.
Here's a slightly revised version of your query:
Table.Group(
#"Added Custom",
{"package_date"},
{
{"Overall Delay", each List.Sum([Delay in mins]), type number},
{"Average Delay", each List.Average([Delay in mins]), type number},
{"On Time Packages", each List.Count(List.Select([On Time], each _ = 0)), type number},
{"Total Packages", each Table.RowCount(_), type number}
}
)