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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.