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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Add missing date first day per month

Hi,
I have a table like this:-

Rick_ferreira_0-1623874009626.png

But I need to add missing data between month, but only first day from each month which value is the same the last month. Like this:

Rick_ferreira_1-1623874084892.png


Is there some way to add the missing data?

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You need to add a new table , please use the following formula to have a try:

New Table =
ADDCOLUMNS (
    DISTINCT (
        SELECTCOLUMNS (
            CALENDAR ( MIN ( 'Table'[Date] ), TODAY () ),
            "Date", DATE ( YEAR ( [Date] ), MONTH ( [Date] ), 1 )
        )
    ),
    "Value",
        VAR _filldate =
            MAXX ( FILTER ( 'Table', 'Table'[Date] <= EARLIER ( [Date] ) ), [Date] )
        RETURN
            LOOKUPVALUE ( 'Table'[Value], 'Table'[Date], _filldate )
)

The final output is shown below:

Add missing date.PNG

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Anonymous ,

 

You need to add a new table , please use the following formula to have a try:

New Table =
ADDCOLUMNS (
    DISTINCT (
        SELECTCOLUMNS (
            CALENDAR ( MIN ( 'Table'[Date] ), TODAY () ),
            "Date", DATE ( YEAR ( [Date] ), MONTH ( [Date] ), 1 )
        )
    ),
    "Value",
        VAR _filldate =
            MAXX ( FILTER ( 'Table', 'Table'[Date] <= EARLIER ( [Date] ) ), [Date] )
        RETURN
            LOOKUPVALUE ( 'Table'[Value], 'Table'[Date], _filldate )
)

The final output is shown below:

Add missing date.PNG

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.