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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Appending 2 tables - one with NULL and another with VALID values. Need to GROUP BY/ DE-DUPLICATE

Hello Gurus,

 

I am trying to append 2 tables into 1. Both tables have set of common dimension columns including one column for 'Period' as shwon below. The picture 1 below shows what I get when I append them and the second picture shows what I need. I need to basically ONLY consider the non-NULL values for the column "Total Sales - Dept1" for the Oct-2030 period coming from table 2 and discard the null ones com table 1. Other columns should get appended as is. Is "Append Queries" the right way to go for this or should I be using "Merge Queries". I think there is way to use GROUP by where I consider the MAX value for the 'Period' column but I am not sure how to use it OR if there is a better way. Any help would be greatly appreciated.

 

 

Append table 1 and 2 (what I get).jpg

 

 

Append table 1 and 2 (what I need).jpg

 

 

 

1 ACCEPTED SOLUTION
DavisBI
Solution Specialist
Solution Specialist

Hi, @Anonymous ,

 

I've simplified your data sources as follows and using "merge queries" is the right way :

 

DavisBI_1-1605493592375.png

Then you just need to using "merge column" ,then remove the others column and duplicated rows:

DavisBI_2-1605494113892.png

Mark this post as solution if this helps, thanks!

View solution in original post

2 REPLIES 2
DavisBI
Solution Specialist
Solution Specialist

Hi, @Anonymous ,

 

I've simplified your data sources as follows and using "merge queries" is the right way :

 

DavisBI_1-1605493592375.png

Then you just need to using "merge column" ,then remove the others column and duplicated rows:

DavisBI_2-1605494113892.png

Mark this post as solution if this helps, thanks!

amitchandak
Super User
Super User

@Anonymous , Append and aggregate  -https://radacad.com/power-bi-aggregation-step-1-create-the-aggregated-table

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors