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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
BobbyDollar
Frequent Visitor

Adding missing calendar month rows to table

Hi

I have have a data table with sales results of Region, Product, Date (only monthly needed) and a Quantity.

BobbyDollar_2-1676294913709.png

I would like to automatically add rows for all Region/Products where the month is missing with Quantity 0. E.g. from DACH and Product M I am missing June as well as Aug - March, so it should add 9 lines with DACH, Product M, missing and so on for the other region/products.

As a result:

BobbyDollar_1-1676294816386.png

Reason is that I want to add a calculated column for the forecast later on, and this might add quantities to the missing month. If I do not have all 12 month line I am missing numbers.

 

I know ... does not sound very professional but i do not know better yet, being under time pressure.

Instead of the month I have a calendar date as well, connected to a date table ...


Any feedback appreciated
Thank you

Robert

 

1 ACCEPTED SOLUTION
serpiva64
Super User
Super User

Hi,

You can achieve this

serpiva64_0-1676300458735.png

starting from this 

serpiva64_1-1676300494927.png

by applying the steps of the attached file

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

 

 

View solution in original post

1 REPLY 1
serpiva64
Super User
Super User

Hi,

You can achieve this

serpiva64_0-1676300458735.png

starting from this 

serpiva64_1-1676300494927.png

by applying the steps of the attached file

If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

 

 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors