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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
LeonardSchwenk
Frequent Visitor

Replace null values by max value by key

I have opened a Dataflow and now I want to fill out missing dates by key.

My data Looks like this :

idnumbertypeINDEXDATUM
25000001002.03.21
250000110 
250000210 
2500003250 
2500004251 
2500005252 
250000610 
25000101026.02.21
250001110 
250001210 
250001310 
250001410 
250001510 
250001610 
250001710 
250001810 
250001940 
25000110170 
25000111220 
25000201016.03.21
250002110 
250002210 
2500023250 
2500024251 
2500025252 
250002610 

 

What I want to achive:

idnumbertypeINDEXDATUM
25000001002.03.21
25000011002.03.21
25000021002.03.21
250000325002.03.21
250000425102.03.21
250000525202.03.21
25000061002.03.21
25000101026.02.21
25000111026.02.21
25000121026.02.21
25000131026.02.21
25000141026.02.21
25000151026.02.21
25000161026.02.21
25000171026.02.21
25000181026.02.21
25000194026.02.21
2500011017026.02.21
2500011122026.02.21
25000201016.03.21
25000211016.03.21
25000221016.03.21
250002325016.03.21
250002425116.03.21
250002525216.03.21
250002610 16.03.21


I tried some if and listes but nothing worked so far.
if date = null then get max(date) where ID = ID
else date


1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @LeonardSchwenk ,

 

It looks like you should just be able to select your [DATUM] column then go to the Transform tab > Fill (dropdown) > Down.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fZJhCoAgGEOvEv4OcUutzhLd/xqVaFg6BRF8gt8bOw7D4O5lZvNs5NPRusUS5pyrF6heTF9EjZYHhz7zhaFloTC2LPa/w0+D0d4mtQa0BrQGsoZAXqOg0cBh1WjTaM+jdBBSKquAyZwtLFdvrPHfipJXZyLqODloBQet4KAVbBM9Lw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, number = _t, #"type" = _t, INDEX = _t, DATUM = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"DATUM", type date}}),
    #"Filled Down" = Table.FillDown(#"Changed Type",{"DATUM"})
in
    #"Filled Down"

BA_Pete_0-1662123745032.png

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

1 REPLY 1
BA_Pete
Super User
Super User

Hi @LeonardSchwenk ,

 

It looks like you should just be able to select your [DATUM] column then go to the Transform tab > Fill (dropdown) > Down.

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("fZJhCoAgGEOvEv4OcUutzhLd/xqVaFg6BRF8gt8bOw7D4O5lZvNs5NPRusUS5pyrF6heTF9EjZYHhz7zhaFloTC2LPa/w0+D0d4mtQa0BrQGsoZAXqOg0cBh1WjTaM+jdBBSKquAyZwtLFdvrPHfipJXZyLqODloBQet4KAVbBM9Lw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [id = _t, number = _t, #"type" = _t, INDEX = _t, DATUM = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"DATUM", type date}}),
    #"Filled Down" = Table.FillDown(#"Changed Type",{"DATUM"})
in
    #"Filled Down"

BA_Pete_0-1662123745032.png

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors