Welcome to Microsoft Q&A Platform. Thanks for posting the query.
Below is one approach I used to implement it. Please use below GIF and attached JSONs for the same.
37719-dataflowjson.txt
37720-pipelinejson.txt
Dynamic Approach:
Also, as the above approach needs knowing the number of columns ahead that are used for aggregations, I added few more transformations(map drifted and select) in addition to suggestions from @DanielP-MSFT and below is the solution for dynamic number of columns. Below is the GIF and attached the code.
38152-dynamicdataflowcodejson.txt
Hope this helps! Please suggest if the requirement is different or for further queries and we will be glad to assist.
--------------------------
- Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
- Want a reminder to come back and check responses? Here is how to subscribe to a notification.