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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
BYENER
Helper V
Helper V

Fill down last week value to other weeks if column A is blank

Hi All,

 

I want to copy the week values which isn't blank to the other blank weeks. In the example attached the last week with value is week 25. I want copy this values to all other weeks in the future without value in column E.  This new formula should replace column F.

BYENER_0-1625140027362.png

 

1 ACCEPTED SOLUTION

thanks for your reply @BYENER 

2 methods:

you can use function switch() to replace each row https://docs.microsoft.com/en-us/dax/switch-function-dax

replace = 
var _baseweek="2021-25"
var _avg2=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=2&&'Table'[Week]=_baseweek))
var _avg3=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=3&&'Table'[Week]=_baseweek))
var _avg4=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=4&&'Table'[Week]=_baseweek))
var _avg5=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=5&&'Table'[Week]=_baseweek))
var _avg6=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=6&&'Table'[Week]=_baseweek))
return IF(MIN('Table'[Week])=_baseweek,[averageMeasure],SWITCH(MIN('Table'[N]),2,_avg2,3,_avg3,4,_avg4,5,_avg5,6,_avg6))

result:

vxiaotang_0-1625819077601.png

 

or replace measure with column.

 

 

Best Regards,

Community Support Team _ Tang

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

View solution in original post

4 REPLIES 4
v-xiaotang
Community Support
Community Support

Hi @BYENER 

you can use add column in PQ editor, e.g.

vxiaotang_0-1625455482937.gif

vxiaotang_0-1625463158933.gif

 

Best Regards,

Community Support Team _ Tang

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

 

Hi @v-xiaotang ,

 

The data in Power BI is not in a table view. It's calculated by a measure (Average %)

 

Hi @BYENER 

Have you solved your problem? If yes, kindly mark the answer helpful as the solution, so that the others having same question can find this post quickly.

or

if problem still persists, pls let me know.

 

Best Regards,

Community Support Team _ Tang

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

thanks for your reply @BYENER 

2 methods:

you can use function switch() to replace each row https://docs.microsoft.com/en-us/dax/switch-function-dax

replace = 
var _baseweek="2021-25"
var _avg2=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=2&&'Table'[Week]=_baseweek))
var _avg3=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=3&&'Table'[Week]=_baseweek))
var _avg4=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=4&&'Table'[Week]=_baseweek))
var _avg5=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=5&&'Table'[Week]=_baseweek))
var _avg6=CALCULATE([averageMeasure],FILTER(ALL('Table'),'Table'[N]=6&&'Table'[Week]=_baseweek))
return IF(MIN('Table'[Week])=_baseweek,[averageMeasure],SWITCH(MIN('Table'[N]),2,_avg2,3,_avg3,4,_avg4,5,_avg5,6,_avg6))

result:

vxiaotang_0-1625819077601.png

 

or replace measure with column.

 

 

Best Regards,

Community Support Team _ Tang

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.