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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
vijaykumarj19
Microsoft Employee
Microsoft Employee

Divide Rows of same columns with row in same column

descv1v2v3v4v5
a1022324323
b2232646643
c2143433454
d3232435456
Z200300400500600

 

I want to divide a,b,c,d rows by z to calculate percentage

 

output should be

descv1v2v3v4v5
aav1/zv1av2/zv2   
bbv1/zv1bv2/zv2   
ccv1/zv1cv2/zv2   
ddv1/zv1dv2/zv2   

 

like i have multiple columns(v6,v7.......)

Need percentage 

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

Here is one way to do it.  Just highlight first column and "Unpivot Other Columns", load that table and it will look like the below.

vztable.png

Then use this DAX expression in a calculated column. 

Divide =
DIVIDE (
vZTable[Value],
CALCULATE (
MIN ( vZTable[Value] ),
ALLEXCEPT ( vZTable, vZTable[vNumber] ),
vZTable[desc] = "Z"
)
)

For the measure version, just wrap the first Divide expression with SELECTEDVALUE() and use it in a table visual with the desc and vNumber columns.

 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

3 REPLIES 3
mahoneypat
Microsoft Employee
Microsoft Employee

Here is one way to do it.  Just highlight first column and "Unpivot Other Columns", load that table and it will look like the below.

vztable.png

Then use this DAX expression in a calculated column. 

Divide =
DIVIDE (
vZTable[Value],
CALCULATE (
MIN ( vZTable[Value] ),
ALLEXCEPT ( vZTable, vZTable[vNumber] ),
vZTable[desc] = "Z"
)
)

For the measure version, just wrap the first Divide expression with SELECTEDVALUE() and use it in a table visual with the desc and vNumber columns.

 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Anonymous
Not applicable

Last row is not grand total it's just a row 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors