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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

PowerBI customize totals in table

Hi all,

 

I want to have two different totals in one table as below ( Total Yield and Total Product Tons), please assist on how to go about this.

 
 

Capture.PNG

 

 

 

 

 

 

 

 

 

Regards

Lufuno

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

HI @Anonymous,

You can create a new calculated table to extract category field values and new total rows, then you can create a visual with new table fields and write measure formula to return correspond results based on the current category.

Category Table =
UNION ( VALUE ( Table[Column] ), { "Total1", "Total2" } )

Measure =
SWITCH (
    SELECTEDVALUE ( 'Category Table'[Column] ),
    "Total1", 'formula',
    "Total2", 'formula',
    'common formula'
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @Anonymous,

You can create a new calculated table to extract category field values and new total rows, then you can create a visual with new table fields and write measure formula to return correspond results based on the current category.

Category Table =
UNION ( VALUE ( Table[Column] ), { "Total1", "Total2" } )

Measure =
SWITCH (
    SELECTEDVALUE ( 'Category Table'[Column] ),
    "Total1", 'formula',
    "Total2", 'formula',
    'common formula'
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
AiolosZhao
Memorable Member
Memorable Member

Hi @Anonymous ,

 

You may need to try to add one more level for your dimension.

 

For example, now what you have is :

Category
SSCC Yield
MET Yield
PSC Yield
SSCC Product Tons
MET Product Tons
PSC Product Tons

 

Please try to add a mapping like below:

NEW LEVEL Category
Total Yield SSCC Yield
Total Yield MET Yield
Total Yield PSC Yield
Total Product Tons SSCC Product Tons
Total Product Tons MET Product Tons
Total Product Tons PSC Product Tons

 

Then put these two columns into table and using  +/- icons, then I think you can see the subtotal as you want in your table.

 

Aiolos Zhao





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors