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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
ilTac
Frequent Visitor

Conditional Column Power Query (M): how to repeat the value for some rows and then change the value

Hi everyone,

i'm trying to achieve the follow in power query:

 

here's what i have as native database 

ilTac_1-1645631400178.png

 and this is what i wolud like:

ilTac_3-1645631431065.png

so basically take one value from first column and repeat for some amout of rows.

I was trying with index and referst to previuos row but of course this won't work.

 

Do you think it is possible to achive this?

Does anyone has some hints on how to do it?

 

Thanks in advance!

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @ilTac ,

 

Try to add a column with the following code:

if (try Date.FromText([Date]) otherwise null) = null then [Date] else null

Then do a fill down on that new column


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

ilTac
Frequent Visitor

Hi @MFelix 

i dind't know about the fill down option.

Thank you very much, solved.

View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @ilTac ,

 

Try to add a column with the following code:

if (try Date.FromText([Date]) otherwise null) = null then [Date] else null

Then do a fill down on that new column


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português





ilTac
Frequent Visitor

Hi @MFelix 

i dind't know about the fill down option.

Thank you very much, solved.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors