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
MaulikG7
Frequent Visitor

How to fill up/down the blanks in a calculated column of data model (Not in Power Query)

All the dates after 1sy July-22 shall have 1st july -22 . THis is a lookup value column in an crossjoin table.

MaulikG7_1-1672164008430.png

 

 

1 ACCEPTED SOLUTION

Hi @MaulikG7 

 

I created a sample file. You can download the attachment to see details. Hope it helps. 

vjingzhang_0-1672384589160.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

View solution in original post

8 REPLIES 8
v-jingzhang
Community Support
Community Support

Hi @MaulikG7 

 

There is no Fill down/Up feature for calculated columns, so you need to add a new column. You can use the following DAX

new column = 
MAXX (
    FILTER (
        'Table',
        'Table'[Date] <= EARLIER ( 'Table'[Date] )
            && NOT ( ISBLANK ( 'Table'[TransferWEF] ) )
    ),
    'Table'[TransferWEF]
)

vjingzhang_0-1672195984896.png

 

Or if the column to Fill Down/Up does not have date values, you can try

new column =
VAR _date =
    MAXX (
        FILTER (
            'Table',
            'Table'[Date] <= EARLIER ( 'Table'[Date] )
                && NOT ( ISBLANK ( 'Table'[TransferWEF] ) )
        ),
        'Table'[Date]
    )
RETURN
    MAXX ( FILTER ( 'Table', 'Table'[Date] = _date ), 'Table'[TransferWEF] )

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

This does half the job... If the employee code changes, then i want it to restart the logic. Right now it brings last non blank value to other employees as well. I tried to add one more condition (code = earlier code), but it is not working.

Hi @MaulikG7 

 

You may try this

new column = 
MAXX (
    FILTER (
        'Table',
        'Table'[Code] = EARLIER('Table'[Code])
            && 'Table'[Date] <= EARLIER ( 'Table'[Date] )
            && NOT ( ISBLANK ( 'Table'[TransferWEF] ) )
    ),
    'Table'[TransferWEF]
)

vjingzhang_0-1672299336698.png

Or

new column = 
VAR _date =
    MAXX (
        FILTER (
            'Table',
            'Table'[Code] = EARLIER('Table'[Code])
                && 'Table'[Date] <= EARLIER ( 'Table'[Date] )
                && NOT ( ISBLANK ( 'Table'[TransferWEF] ) )
        ),
        'Table'[Date]
    )
RETURN
    MAXX ( FILTER ( 'Table', 'Table'[Code] = EARLIER('Table'[Code]) && 'Table'[Date] = _date ), 'Table'[TransferWEF] )

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

In case this gives more clarity, this is what i want..

MaulikG7_0-1672332534129.png

 

Hi @MaulikG7 

 

I created a sample file. You can download the attachment to see details. Hope it helps. 

vjingzhang_0-1672384589160.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!

Yes. That does work. I checked it from my end as well. Will close this thread as it is solved however this measure is causing that forever 'working on it' issue as my calculated column has around 11 million rows.

Will this work if we remove WEF date 1st July from emp code 2 then for the period 1st July to 4th July it shall give blank in the new column. I will try and let u know.

amitchandak
Super User
Super User

@MaulikG7 , we have to create a new column.

 

new column =

var _max = maxx(filter(Table, Table[Date]>= earlier([Date]) && not(isblank(Table[Code])) ), [Code])

return

if(isblank([code]), _max,[Code])

 

Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Kudoed Authors