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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
pabb
Frequent Visitor

Fill in blank rows on calculated table with previous value

Hey,

 

I want to create a calculated column on a calculated table and fill in blank rows with previous values. I cannot do it with measures.

 

I have the following data:

pabb_0-1692380487106.png

 

the rows I want to fill in are in column [tc al dof], however, the data is pretty inconsistent.

 

Any ideas?

 

Regards,

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @pabb ,

 

Please create  a new calculated column:

tc al dof 2 = 
VAR _index = 'Table'[Numero Semana]
VAR _max_index = CALCULATE(MAX('Table'[Numero Semana]),FILTER(ALL('Table'),'Table'[Numero Semana]<_index && NOT ISBLANK('Table'[tc al dof])))
VAR _result =IF(ISBLANK('Table'[tc al dof]),CALCULATE(MAX('Table'[tc al dof]),FILTER(ALL('Table'),'Table'[Numero Semana]=_max_index)),'Table'[tc al dof])
RETURN
_result

vcgaomsft_0-1692601677289.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

5 REPLIES 5
HKInd
Helper I
Helper I

Fill =
var curr = 'Table'[tc al dof]
var prerow =
CALCULATE(MAX('Table'[tc al dof]),
FILTER(
    ALL('Table'),
    'Table'[tc al dof]<> BLANK() && 'Table'[tc al dof]<>curr
)
)
RETURN
IF(ISBLANK(curr),
prerow,curr)
Anonymous
Not applicable

Hi @pabb ,

 

Please create  a new calculated column:

tc al dof 2 = 
VAR _index = 'Table'[Numero Semana]
VAR _max_index = CALCULATE(MAX('Table'[Numero Semana]),FILTER(ALL('Table'),'Table'[Numero Semana]<_index && NOT ISBLANK('Table'[tc al dof])))
VAR _result =IF(ISBLANK('Table'[tc al dof]),CALCULATE(MAX('Table'[tc al dof]),FILTER(ALL('Table'),'Table'[Numero Semana]=_max_index)),'Table'[tc al dof])
RETURN
_result

vcgaomsft_0-1692601677289.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

This worked, thanks a lot @Anonymous 

sergej_og
Super User
Super User

Hi @pabb ,
is column [tc al dof] accesable in PQ View or is your table completely calculated table?
In PQ you can easily fill blank cells up or down.

sergej_og_0-1692485725063.png

 

Mkarwa-123
Resolver II
Resolver II

@pabb try to use earlier() dax function.

Did I answer your question? Mark my post as a solution! If my post helped you, why not give it a thumbs-up?

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