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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
hooleee
Regular Visitor

How to set the null value to the previous value

This is original data,the supplier B dont have value when 2024/1/3

hooleee_0-1707035709308.png

 

This is power bi table

hooleee_0-1707035209220.png

 

How to set the null value to the previous value.

Like this,if the date has no value, the value of the previous date is used:

hooleee_1-1707035744938.png

 

1 ACCEPTED SOLUTION
ThxAlot
Super User
Super User

ThxAlot_0-1707040302081.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

ThxAlot_0-1707040302081.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



thx for your answer😘

Daniel29195
Super User
Super User

@hooleee 

measure = 

VAR current_date =
    MAX ( dimdate[date] )

VAR ds =
    SELECTCOLUMNS (
        CALCULATETABLE (
            LASTNONBLANK (
                VALUES ( dimdate[date] ),
                [ measure]
            ),
            REMOVEFILTERS ( dimdate ),
            dimdate[date] <= current_date
        ),
        dimdate[date]
    )

VAR res =
    CALCULATE (
        [measure],
        dimdate[date] = ds
    )

return

res

 

 

let me know if it works for you ,

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

 

thx for your answer 🙂

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.