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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
BoyerAlexis
Frequent Visitor

Automaticly generate missing rows

Hi,

 

I'm facing an issue at work.

I've got a table with monthCode, city, action as columns, like so :

MonthCodeCityActions
1Dijon5
1Nevers2
1Autun8
2Dijon8
2Autun5
3Dijon11
3Nevers1
3Autun14

 

As you can see, Nevers onlys has records for the 1st & 3rd month but not the second.
I'd like to automaticly generate a row like this :

2Nevers0

 

Do you guys've got any idea if this is possible and give me a lead on this ?

I've tried something with powerquery & the ADDMISSINGITEM thingy with SUMMARIZECOLUMNS but it didn't work, as expected.

1 ACCEPTED SOLUTION
FarhanAhmed
Community Champion
Community Champion

If you want to view records that are no available for months you can do following

 

- Create a separate table for City

- Create a separate table for MonthCode

- Join Both table with this main table

- Use City & MonthCode from those new tables in Table Visual

- Use Actions from main table

- in Table Visual fields right click on city and check "Show Items with no data"

- you will get following results  as show in Table 2

 

FarhanAhmed_0-1654674196015.png

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
FarhanAhmed
Community Champion
Community Champion

If you want to view records that are no available for months you can do following

 

- Create a separate table for City

- Create a separate table for MonthCode

- Join Both table with this main table

- Use City & MonthCode from those new tables in Table Visual

- Use Actions from main table

- in Table Visual fields right click on city and check "Show Items with no data"

- you will get following results  as show in Table 2

 

FarhanAhmed_0-1654674196015.png

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Thanks a lot for your answer Ahmed !

I've managed to join my city and monthCode tables like this

BoyerAlexis_0-1654678737375.png


But, this might seems dumb, how do i join my main table with this one ?

you need to create seperate table for each of Month Code & City and joined them in Data Model as shown below

 

FarhanAhmed_0-1654682924787.png

 

I have created those tables using simple approach of summarize on Main table

 

City = SUMMARIZE(Table,Table[City])

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




This is exactly what we needed, thanks a lot Ahmed !

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.