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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JeevanMallya
Frequent Visitor

How to Insert Missing Week Numbers

I have a Table with Incoming Customer Defects.In some Weeks there are no customer defects reported. So i want to add Missing WEEK_NUM of that year and against those Missing Week_Num, Count as Zero.

Here in the table you will see that Week Num 54, 1, 5, 8... missing.

Can you please help me how to insert those in Power BI.

 

PROJECT_KEYYEARWEEK_NUMCount
ABC2022451
ABC2022463
ABC2022475
ABC20224811
ABC20224914
ABC2022504
ABC2022518
ABC2022525
ABC2022531
ABC202322
ABC202334
ABC202345
ABC202362
ABC202374
ABC202382
ABC202391
ABC2023104
ABC2023111
ABC2023125
ABC2023131
ABC2023144
ABC2023152
ABC2023167
ABC2023177
ABC2023196
ABC2023203
ABC2023214
ABC2023223
ABC2023231
ABC2023241
ABC2023254
ABC2023261
ABC2023292
ABC2023321
ABC2023333
ABC2023341
ABC2023371
ABC2023396
ABC2023406
ABC2023421
ABC2023441
ABC2023461
ABC2023473
ABC2023481
ABC2023492
ABC2023503
ABC2023512
ABC2023521
1 ACCEPTED SOLUTION

Hello @JeevanMallya 

Just create a relationship based on yourtable[weeknum] and the Weeknum table created using generate series and use weeknum from the custom table created (Weeknum[value] from below SS).

NaveenGandhi_0-1705068762135.png

If this post helps, then please consider Accepting it as the solution to help the others find it more quickly. Appreciate you kudos!!

 

View solution in original post

3 REPLIES 3
NaveenGandhi
Super User
Super User

Hello @JeevanMallya 

 

The attached file has the solution that you need. Let me know if this works for you.

If this post helps, then please consider Accepting it as the solution to help the others find it more quickly. Appreciate you kudos!!

Hi @NaveenGandhi  : Thank you help.

Can you please help me in understanding how to build this.I see from the attached file that a new table Week_Num is created that generates series from 1 to 54 week Numbers and a Measure Count is created for inserting Zeros.

I do see that Value and Count- gives the requirement. But how do i merge this in single table (Data table in this case) since i want this in single table that will help me later visually build and display Data for all weeks. LIke

 

PROJECT_KEYYEARWEEK_NUMCount
ABC2022451
ABC2022463
ABC2022475
ABC20224811
ABC20224914
ABC2022504
ABC2022518
ABC2022525
ABC2022531
ABC2022540
ABC202310
ABC202322
ABC202334
ABC202345
ABC202350
ABC202362
ABC202374
ABC202382
ABC202391
ABC2023104
ABC2023111
ABC2023125
ABC2023131
ABC2023144
ABC2023152
ABC2023167
ABC2023177
ABC2023196
ABC2023203
ABC2023214
ABC2023223
ABC2023231
ABC2023241
ABC2023254
ABC2023261
ABC2023292

Can you please help.

Hello @JeevanMallya 

Just create a relationship based on yourtable[weeknum] and the Weeknum table created using generate series and use weeknum from the custom table created (Weeknum[value] from below SS).

NaveenGandhi_0-1705068762135.png

If this post helps, then please consider Accepting it as the solution to help the others find it more quickly. Appreciate you kudos!!

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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