Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
v-teven
Regular Visitor

How to add rows based on values in other table?

Hi, I have two tables connected by the "attribute" field - which states the country, year, quarter and segment. One of the tables contains the "values" and these are unique entries by quarter and segment. The other table contains the "Measure" with multiple entries by quarter, month and day. My problem is that some quarters have no data in a spectific quarter, such as in this example: left table contains the measure, but misses attribute "Ireland-FY18-Q2-Corporate" because it has no entry (measure) for that specific country/time/segment; right table shows the missing entry. 
How can I "add" those missing rows? 

Capture.PNGCapture.2.PNG 

 

 

3 REPLIES 3
Anonymous
Not applicable

Lets name your tables as Table 1 ( with measures & row to be added) and Table 2 ( it has extra rows)

 

You can merge these tables in Power Query with Right outer join.

 

In Power Query -> Home -> Merge-> Merge Queries, Table1 as First table and Table 2 as 2nd table , join type is Right outer join.

Now, you will have the missing row, with null value in Measure field .

 

Thanks

Raj

Thanks for your reply. 

 

I want to avoid merging because the query of table 1 is too large and takes a long time to load. Also, I'm using it in the report for another tables with measures that are all connected. I think redoing everything again would give me more work than trying a different alternative.  Any alternative suggestion would be really appreciated. 

 

Thank you!

Anonymous
Not applicable

Hi @v-teven,

 

I think union function(dax) and Table.InsertRows(M query) will suitable for your requirement:
UNION Function (DAX)

Table.InsertRows

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors