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! Request now

Reply
Anonymous
Not applicable

add calculated row to table visualization that sums certain rows

Hi all,

 

I current have a sample data visualisation in a table format from Beef to Watermelon. What I wish to do is create a new calculated row "Fruits" which will sum the values from Apple to Watermelon. I understand that it is possible to create a measure for column but what about for rows? Any help is appreciated. Thanks!


Food    Total No. of Sales       Total No. of Sales in Morning             % of Food sold in Morning
Beef                  560                           125                                                           22.32%
Apple               146                            211                                                          4.38%
Banana             238                            54                                                            22.69%
Pineapple         520                           122                                                           23.46%
Watermelon     501                           125                                                           24.95%
Fruits               1405                          322                                                           22.91%

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Anonymous - You can create a new table or calculated table that includes the existing data and the calculated totals 

 

In ROW function i have used the sum of Total no. of sales inside the formaule, you can also create seperate measure and reuse it in summary table.

 

rajendraongole1_0-1720240658184.png

 

 

Use below calculated table :

SummaryTable =
UNION(
    SELECTCOLUMNS(
        'Fruits',
        "Food", 'Fruits'[Food],
        "Total No. of Sales", 'Fruits'[Total No. of Sales],
        "Total No. of Sales in Morning", 'Fruits'[ Total No. of Sales in Morning],
        "% of Food sold in Morning", 'Fruits'[% of Food sold in Morning]
    ),
    ROW(
        "Food", "Fruits",
        "Total No. of Sales", SUM(Fruits[Total No. of Sales]),
        "Total No. of Sales in Morning", SUM(Fruits[ Total No. of Sales in Morning]),
        "% of Food sold in Morning", DIVIDE(SUM(Fruits[ Total No. of Sales in Morning]),SUM(Fruits[Total No. of Sales]))
    )
)
 
Hope it works
 
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!




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

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @Anonymous - You can create a new table or calculated table that includes the existing data and the calculated totals 

 

In ROW function i have used the sum of Total no. of sales inside the formaule, you can also create seperate measure and reuse it in summary table.

 

rajendraongole1_0-1720240658184.png

 

 

Use below calculated table :

SummaryTable =
UNION(
    SELECTCOLUMNS(
        'Fruits',
        "Food", 'Fruits'[Food],
        "Total No. of Sales", 'Fruits'[Total No. of Sales],
        "Total No. of Sales in Morning", 'Fruits'[ Total No. of Sales in Morning],
        "% of Food sold in Morning", 'Fruits'[% of Food sold in Morning]
    ),
    ROW(
        "Food", "Fruits",
        "Total No. of Sales", SUM(Fruits[Total No. of Sales]),
        "Total No. of Sales in Morning", SUM(Fruits[ Total No. of Sales in Morning]),
        "% of Food sold in Morning", DIVIDE(SUM(Fruits[ Total No. of Sales in Morning]),SUM(Fruits[Total No. of Sales]))
    )
)
 
Hope it works
 
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!




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

Proud to be a Super User!





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