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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Georgesunil77
Advocate II
Advocate II

Total rows into a column using formula

Hi Team,

I have two columns :


Columns 1 is Week (Wk1, Wk2, Wk3, Wk4, Wk5)
Columns 2 has totals (100, 200, 400, 500, 100)

I need to create columns for each Week, eg. Wk1 will the third columns which will be based on Column 1, totalling Column  2.

 

Regards,

Sunil

1 ACCEPTED SOLUTION
v-mengzhu-msft
Community Support
Community Support

Hi @Georgesunil77 ,

Is this result you want to achieve?

vmengzhumsft_0-1657790208435.png

If it is, you can consider adopting my approach.

1.This is an initial table with the same data as yours:

vmengzhumsft_1-1657790208436.png

2.I copied the two columns:

vmengzhumsft_2-1657790208438.png

3.Select the two duplicate columns, and then click "pivot column" at the top.

vmengzhumsft_3-1657790208441.png

4.Finally, I get this table as the result shows.

 

I hope my process will be helpful to you.

Best regards,

Community Support Team Selina zhu

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-mengzhu-msft
Community Support
Community Support

Hi @Georgesunil77 ,

Is this result you want to achieve?

vmengzhumsft_0-1657790208435.png

If it is, you can consider adopting my approach.

1.This is an initial table with the same data as yours:

vmengzhumsft_1-1657790208436.png

2.I copied the two columns:

vmengzhumsft_2-1657790208438.png

3.Select the two duplicate columns, and then click "pivot column" at the top.

vmengzhumsft_3-1657790208441.png

4.Finally, I get this table as the result shows.

 

I hope my process will be helpful to you.

Best regards,

Community Support Team Selina zhu

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

tamerj1
Super User
Super User

Hi @Georgesunil77 
Are you trying to create a visual on power bi or you want to transform the row data? If you you want to create a visual just use a matrix and place Column1 in the columns of the matrix and column2 in the values. If you want to transform the row data you can use power query to Pivot Column1.

amitchandak
Super User
Super User

@Georgesunil77 , If the week name is not is sortable form then create a new column

 

Week Num = right([Column 1], len([Column 1]) -2)

 

then create a new column=

sumx(filter(Table, Table[week num] < = earlier(Table[week Num]) ) , [Column 2])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.