Forum Discussion
KBD
Helper III
1 year agoPower Query under Power BI desktop create/add column for count of grouping
Hello: New to the PowerQuery/ Power BI world. I have a simple requirement.. I need to create a column which is the count of a two column grouping. In Power BI this works: weeklyNumMaint = ...
KBD
Helper III
1 year agoIf I was doing this in SQL it would be something like this:
with ay_count as
(select assetNo, yearweek, count() as assetWeek_WO_count
from workorder
group by assetno, yearweek )
select wo.assetNo, wo.yearweek, wo.col1, wo.col2, wo.col3,.... assetWeek_WO_count
* from workorder wo, ay_count
where wo.assetNo = ay_count.assetNo and
wo.yearweek = ay_count.yearweek
As per my last reply to Shahariar, I believe I have the first select working in Power Query.
How is the second Select statement above done?
Thanks for your kind assistance.
KD