Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have incoming Excel workbooks that I receive monthly. Each workbook gives me one sheet that has columns for, [SKU, SHIP DATE (M/D/Y), and Qantity].
From this data I get how many SKUs are to ship in the provided upcoming months, usually extending out 9 months.
My problem is that I pull these workbooks in using <Get Data, From Folder> and if the prevous workbook had say 10 for 10/1/2024, 15 for 11/1/2024, 25 for 12/1/2024, 10 for 1/1/2025, then in the next received workbook the line for date 12/1/2024 is ommitted I cannot use my DAX measure that provides me with the LASTNONBLANK becuase it will still be looking at the older workbook amount of 25 for 12/1/2024.
There isn't a row that has 12/1/2024, Qty -. The row for that date is just left off the list.
If I input a zero by adding a +0 to the LASTNONBLANK measure this doesn't work.
In Power Query how can I add the missing row of data back into the list with a Zero QTY by using the start of the [SHIP DATE] and the last [SHIP DATE] provided (not all SKUs are missing a row of data, so I'm guarentied a Min and Max range)?
Hi @RobRayborn ,
As a workaround, you can create a date table to fill in the missing dates with a quantity of 0. Here’s a step-by-step guide to achieve this:
1.Create a list of all dates within the range: Refer to Create Calendar Table Using Power Query M Language (mssqltips.com)
2.Merge the list of dates with your data: Merge this list with your existing data to ensure every date within the range is represented.
3.Fill missing dates with zero quantity: Replace any missing quantities with 0.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you provide the sample of your data?
Three Entry Dates, keep an eye on the Date Due December range. It disapears in the Date created 9/26/2024 range. Without a December 2024 entry of 0, my DAX measure of LASTNONBLANK continues to pick up the December amount from the 8/29/2024 Date created range.
Date created | PARTNBR | DATE DUE | QTY DUE |
7/29/2024 | ABC | 8/6/2024 | 960 |
7/29/2024 | ABC | 8/9/2024 | 14 |
7/29/2024 | ABC | 8/23/2024 | 6 |
7/29/2024 | ABC | 9/3/2024 | 480 |
7/29/2024 | ABC | 9/9/2024 | 13 |
7/29/2024 | ABC | 9/17/2024 | 480 |
7/29/2024 | ABC | 9/20/2024 | 14 |
7/29/2024 | ABC | 10/1/2024 | 17 |
7/29/2024 | ABC | 10/1/2024 | 480 |
7/29/2024 | ABC | 11/1/2024 | 7 |
7/29/2024 | ABC | 11/5/2024 | 480 |
7/29/2024 | ABC | 11/15/2024 | 42 |
7/29/2024 | ABC | 11/26/2024 | 480 |
7/29/2024 | ABC | 12/6/2024 | 16 |
7/29/2024 | ABC | 12/10/2024 | 640 |
7/29/2024 | ABC | 12/19/2024 | 10 |
8/29/2024 | ABC | 9/10/2024 | 2 |
8/29/2024 | ABC | 9/20/2024 | 11 |
8/29/2024 | ABC | 9/27/2024 | 16 |
8/29/2024 | ABC | 10/15/2024 | 480 |
8/29/2024 | ABC | 10/22/2024 | 480 |
8/29/2024 | ABC | 10/29/2024 | 19 |
8/29/2024 | ABC | 11/5/2024 | 480 |
8/29/2024 | ABC | 11/12/2024 | 6 |
8/29/2024 | ABC | 11/26/2024 | 5 |
8/29/2024 | ABC | 11/26/2024 | 480 |
8/29/2024 | ABC | 12/10/2024 | 21 |
8/29/2024 | ABC | 12/19/2024 | 21 |
9/26/2024 | ABC | 8/27/2024 | 1 |
9/26/2024 | ABC | 10/15/2024 | 480 |
9/26/2024 | ABC | 10/22/2024 | 480 |
9/26/2024 | ABC | 11/5/2024 | 480 |
9/26/2024 | ABC | 11/26/2024 | 480 |
9/26/2024 | ABC | 1/5/2025 | 360 |
9/26/2024 | ABC | 2/6/2025 | 190 |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
9 | |
8 | |
7 |
User | Count |
---|---|
17 | |
10 | |
7 | |
6 | |
6 |