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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power BI query NATURAL...
Power Automate
Unanswered

Power BI query NATURALLEFTOUTERJOIN with a GROUPBY

(0) ShareShare
ReportReport
Posted on by

Hi friends!

I am a newbie at Power Automate, and I am working to automate a long work process, taking data from Power BI and then inserting it into another data management system. There is a many to one relationship between the two tables, leading to many rows with the same identifier. 

 

The goal of this DAX query is to:

- Join the two tables in a left join

- Get all the columns needed from both tables

- Aggregate the measure fields, grouped by the identifier field

- Return the new table with one row per identifier field

 

I have tried all sorts of combinations of SUMMARIZE, SUMMARIZECOLUMNS, GROUPBY, etc. The issue I am finding is that if I gather all the data BEFORE doing the join,  I can either do the left join, OR get the aggregation, but because the relationship between the two tables isn't naturally recognized, I have to do Table[identifier]&"" when selecting the identifier row in both tables, invalidating it in the GROUPBY and throwing the error that there are too many unique identifiers per row.

 

Now, I have been trying to do the join FIRST, and then get all the data with a GROUPBY. The issue I am running into is that the NATURALLEFTOUTERJOIN table is resulting in headers like this: Table[field]. Then if I try to reference that header, I have to do it like this NewTable[Table[field]] which throws an error because brackets aren't allowed in the field names.

 

EVALUATE

VAR JoinedTable = NATURALLEFTOUTERJOIN('Table1', 'Table2')

VAR GroupedTable =

GROUPBY(JoinedTable,

JoinedTable[Table1[item1]],

JoinedTable[Table1[item2]],

Etc.

"itemx", SUMX(CURRENTGROUP(), JoinedTable[Table2[itemx]]))

RETURN GroupedTable

 

Does anyone know of any way to go around this? I am super familiar with SQL, but it is messing up the way I think about table queries. Any help is super appreciated!

 

Categories:
I have the same question (0)
  • lbendlin Profile Picture
    8,624 Super User 2026 Season 1 on at

    how are these tables joined in the data model of the Power BI dataset?  Can you maybe provide sample data for each table and indicate the expected outcome?  Then we could propose a suitable DAX query.

     

    If you prefer to troubleshoot it yourself you will want to use DAX Studio for the modeling/refactoring.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard