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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Vipin
New Member

Replace blank values with the value of the row above

I have a csv file in the below format:

Timestamp Vehicle speed Fuel Level RPM
Timestamp Fuel Level
4/3/2016 12:28 49.2
4/3/2016 12:30 48.8
4/3/2016 12:32 48.8
4/3/2016 12:35 0
4/3/2016 12:37 0
4/3/2016 12:39 0
4/3/2016 12:40 48.8
4/3/2016 12:45 48

 

In the above table the fuel level goes to zero. I would like to replace the zeros with the pervious row value.

 

Any help is appreciated.

Thank you.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Vipin

 

are they nulls or 0

if 0 then replace them with null as below and use Fill option with Down

Fill1.PNGFill 2.png

 

here is the final result

Fill Result.PNG

 

hope this helps

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

@Vipin

 

are they nulls or 0

if 0 then replace them with null as below and use Fill option with Down

Fill1.PNGFill 2.png

 

here is the final result

Fill Result.PNG

 

hope this helps

Anonymous
Not applicable

what if I have the exact scenario in a calculated table? how can I use FILL option in DAX? I am trying usnig EARLIER or EARLIEST without success.

Hi @Anonymous,

 

Show your data and the expected result.


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

please, see below what I have and what I need, using DAX.
attention to holidays midweek.

 

dateweekdayvalues I havevalues I need
01/novWednesday11
02/novholiday 1
03/novFriday22
04/novSaturday 2
05/novSunday 2
06/novMonday33
07/novTuesday44
08/novWednesday55
09/novThursday66
10/novFriday77
11/novSaturday 7
12/novSunday 7
13/novMonday88
14/novTuesday99
15/novholiday 9
16/novThursday1010
17/novFriday1111
18/novSaturday 11
19/novSunday 11
20/novMonday1212
21/novTuesday1313

Hi,

 

I don't think i can solve this in DAX.  Thr easiest way would be to use the Query Editor.


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

Hi, I want to replace my blanks into word "Blanks" so that I can show them in the slicer as blanks itself as one line item, is it possible ??

 

I have list of word in the 1st column 

 

column1

Apple

Bag

Car

             <- Blank 

Echo 

 

Expecting Output:

column 

 

Apple 

Bag 

Car 

(Blank)

Echo 

 

Thank you in advance 

 

SabineOussi
Skilled Sharer
Skilled Sharer

Hi @Vipin,

 

You need to:

- Go to the query editor, click on the "Level" column and transform its type to text instead of number --> this will let you catch all zeroes
- Add a custom column "Level_New" having the following syntax: if [level]="0" then "" else [level] --> this will let you replace all zeroes with blanks

- Change Level_New type to decimal number --> this will give the value null to all blank fields

- Select the column Level_New and under Transform/Any Column, click on Fill/Down --> this will fill all null fields with the value of the field above

 

Hope it helps!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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