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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Repeat First Row from Another column

Hi Experts

 

I would like to repeat the value 202 for 0 index value in a new column for all the corresponding values in the Value_ column. The Value_ column is a calculated column. 

 

Previous IndexValue_Result
0202202
1191.9202
1191.9202
1191.9202
0202202
1191.9202
1191.9202
1191.9202
0202202
1191.9202
1191.9202
1191.9202
1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Add an index column in Power Query, then create a calculated column.

Result = CALCULATE(SUM('Table'[Value_]),'Table'[Index]=1,ALL('Table'))

12.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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

 

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Add an index column in Power Query, then create a calculated column.

Result = CALCULATE(SUM('Table'[Value_]),'Table'[Index]=1,ALL('Table'))

12.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

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

 

amitchandak
Super User
Super User

@Anonymous , Add an index column

https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi


Then add new column n dax

new column = maxx(filter(Table, [index] <=[Index] && [Previous Index] =0),[Value_])

Anonymous
Not applicable

Hi Amit - this is my problem when i add a index

Capture.PNG

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.