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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
isafu
New Member

Merging some rows with same dates (multiple rows have same date but different data)

POWER QUERY HELP ENGLISH.jpg

 

Hi, I'm very new at using Power Query, I would appreciate any pointers / guide to solve this case 

Data source are two different table, purchase and production 

I need to make a report table based on date, as shown on the bottom right table 

 

What I have tried: 

Using unpivot 

 

Result:

Expression.Error: There weren't enough elements in the enumeration to complete the operation

 

Thank you!

 

1 REPLY 1
edhans
Super User
Super User

I woud not merge these tables in Power Query. Bring them in largely as they are. You also need a date table - one is included below for your reference.

 

Now, use the Date table to control both of these FACT tables - flour purchase and cookie data. Relate the date field fro the Date table to both date fields. It would look similar to the below. (ignore the color and odd relationship on the sales table here, it is a composite model and it will look "normal" on your model.

edhans_0-1663083936861.png

 

 

Drop the Date from the date table in a visual, like a Table or Matrix viz. Now drop data and measures (but not the date field) from both Flour and Cookie tables and it should show up correctly. This is how a Star Schema works when using 1 or more dimension tables to control/filter 2+ fact tables.

 

Creating a Dynamic Date Table in Power Query

 

Microsoft Guidance on Importance of Star Schema



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.