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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Jerush
Helper I
Helper I

How to create dummy columns in numeric order based on a date difference

Hi All,

I have created a report using the matrix visual. The column is a date difference in month. 1, 2, 3.... Row is a date value.
There are some months "missing" purely due to what the data is, however it need to show those months just with a zero value.

 

So if its month 1 2 3 7 - I need to fill in 4 5 6, etc. Is there anyway of doing that without adding dummy data in the actual data.

 

Thank you all in advance.

Jerusha                                                                                                                                                                              

9 REPLIES 9
Ali123
Frequent Visitor

Hi,

Can you guide me how we can move sub columns total to the left side of matrix?
matrix_LI.jpg

Jerush
Helper I
Helper I

Hi All,

I am working through the solution provider.. not sure if I am on the right track

I created a new table with the number of months required.

Jerush_0-1623402613266.png

I joined this to my existing table

Jerush_1-1623402752725.png

 

and this is what I get. Almost as an inner join?

Jerush_2-1623402810686.png

Also when I join this to my data, which field do I use to the matrix to show the months 1 - 47 in this case.

 

THank you all again 😊
Jerusha

 

 

v-stephen-msft
Community Support
Community Support

Hi @Jerush ,


Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.


Best Regards,
Stephen Tao

Hi @v-stephen-msft  
Hope you are well. Please see the new info I have provided.

 

Thank you

Jerusha

Hi Stephan,

 

THis solution looks like it will work. I am just working through the steps that has been given.  Still at a beginner level on power bi. 

 

Thank you though.

Msta
Helper I
Helper I

Create a new table and add relationship;

Months = SELECTCOLUMNS(GENERATESERIES(1,12,1),"MonthNo", [Value])




Add this new column to matrix.

Then change properties of  measure in visualisation "Show Item with no data" or change your measures to display 0 instedof BLANK()

 

Hi Msta,

 

Thank you for the speedy reply. I will give this a go. Much Appreciated

amitchandak
Super User
Super User

@Jerush , Create a table with values , using generateseries

 

month= generateseries(1,12,1)

 

Join this with the column in your table.

 

Create a measure with +0 and use

count(Table[column]) +0

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak 

 

Thank you for the speedy reply. I will give this a go. 

Much Appreciated.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors