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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Gilson_Souza
Frequent Visitor

Fill blank values based in the next/last value

Hi, everyone! I need some help, please.

I need to fill the blank values with the next (or last) License Plate value:

 

This is what I have:

 

DateLicense PlateValue
01/07/2022ABC123A22
02/07/2022ABC123B22
03/07/2022ABC123L22
04/07/2022ABC123 
05/07/2022ABC123B22
06/07/2022ABC123 
07/07/2022ABC123 
08/07/2022ABC123L22
09/07/2022ABC123 
10/07/2022ABC123C22
01/07/2022CPC322 
02/07/2022CPC322K99
03/07/2022CPC322 
04/07/2022CPC322D99
05/07/2022CPC322 
06/07/2022CPC322 
07/07/2022CPC322G99
08/07/2022CPC322 
09/07/2022CPC322D99
10/07/2022CPC322D99

 

This is what I need:

 

DateLicense PlateValue
01/07/2022ABC123A22
02/07/2022ABC123B22
03/07/2022ABC123L22
04/07/2022ABC123L22
05/07/2022ABC123B22
06/07/2022ABC123B22
07/07/2022ABC123B22
08/07/2022ABC123L22
09/07/2022ABC123L22
10/07/2022ABC123C22
01/07/2022CPC322K99
02/07/2022CPC322K99
03/07/2022CPC322K99
04/07/2022CPC322D99
05/07/2022CPC322D99
06/07/2022CPC322D99
07/07/2022CPC322G99
08/07/2022CPC322G99
09/07/2022CPC322D99
10/07/2022CPC322D99

 

I could use Power Query's fill option, but some values ​​would be filled incorrectly.

 

Thank you very much.

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

I do not see any logic in your solution.  If you paste this data in an MS Excel file, then why should there not be K99 in cell C14 (why are yuo showing D99 there).  This is just one that i noticed - there could be more as well.  Please review all and clarify.


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

If the first value of a car is empty I need to get the value below instead of the value above

That's what happens to C13 cell:

 

EXAMPLE.png

marcelsmaglhaes
Super User
Super User

Hey @Gilson_Souza ,

I think you should do this using fill down. But at first, you need to transform the blank values into null values, and after that, you can use the fill down option. 

 

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

 

Regards,

Marcel Magalhães

 

 

marcelsmaglhaes_0-1659729928429.pngmarcelsmaglhaes_1-1659729952211.pngmarcelsmaglhaes_2-1659729971041.png

 


Regards,
Marcel Magalhães
Microsoft Power BI Official Partner
MCT | Certified PL-300 Power BI

If I've helped, don't forget to mark my post as a solution!



Hi, Marcel. Thanks for your help and sorry the delay, I was sick this week.

 

I can't use fill down cause the first value of a particular car could be empty like this:



10/07/2022ABC123C22
01/07/2022CPC322 
02/07/2022CPC322K99

 

CPC322 can't have X22 values, only X99, so the filled value would be K99, not C22.

Helpful resources

Announcements
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!

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.

Top Solution Authors