web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Query M - Merge ...
Power Apps
Unanswered

Power Query M - Merge count of rows into another table

(0) ShareShare
ReportReport
Posted on by 206

As I am sure most issues with Power Query are, I know how to do it in Excel - but have no idea how to accomplish it in Power Query M. 

 

Just to be clear, I am using the Dataflows page from Dataverse (on the Power Apps page) to manipulate a Dataverse table. Using two tables, I am trying to create one new table.

 

The two tables are:

1. Students - a reference table with unique rows for each student.

2. Behaviour Issues - non-unique rows that list each time a student breaks the rules. I would liken it to monthly transactions at a register: some people come in more than once in a month and I am trying to count various common categories.

 

Students table:

J_Taylor_0-1665629019118.png

 

Behaviour Issues:

J_Taylor_1-1665629134577.png

 

I am aware of "Group By". However, this displays the data in its own table.

> Count of total of each student

J_Taylor_2-1665629207790.png

>Count of each student and issue1

J_Taylor_3-1665629239517.png

>Count of each student, issue1 and issue2 (I could have just done student and issue2, since issue2 is unique to issue1)

J_Taylor_4-1665629309150.png

 

I have created a sheet showing the desired outcome (attached and below).

J_Taylor_5-1665629953795.png

 

Not that it is much, but in Excel, this would be easy. For Total, I would just use CountIf looking for each time the student number occurred. The other columns would be CountIFS looking for the student number and each issue (referencing the headers). 

 

I don't know if "Group By" is part of the answer. I looked at "Merge Queries", but didn't get far enought with grouping to try. Hopefully, my explanation is clear. Any help to achieve my final table would be much appreciated.

I have the same question (0)
  • J_Taylor Profile Picture
    206 on at

    I never found an answer for this. Instead, I linked the tables directly with PowerBI and manipulated them through there. I used DAX measures, Power Query (merge) and custom columns to get what I needed.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard