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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
John-Cena88
Frequent Visitor

Show total sum in each row for the category

I want to achieve the following: 

JohnCena88_0-1712681675084.png

The Problem is, that the value column from my table visual is also a measure. Any idea how to achieve that? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @John-Cena88 ,

First of all, many thanks to @Greg_Deckler  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1712714296737.png

2.Create the new measure to calculate value.

 

Value = 
VAR pro_ = SELECTEDVALUE('Table'[Product])
RETURN
IF(pro_ = "A1" || pro_ = "A2", 2, 
    IF(pro_ = "A3" || pro_ = "A4", 3, 
        IF(pro_ = "B1" || pro_ = "B2", 5, 6)
    )
)

 

3.Create the new measure to calculate total for category.

 

total sum = CALCULATE(SUMX('Table', 'Table'[Value]), ALLEXCEPT('Table', 'Table'[Category]))

 

4.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1712714405806.png

 

Best Regards,

Wisdom Wu

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

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Write this measure

Total value per category = calculate([Value],all(Data[Product]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @John-Cena88 ,

First of all, many thanks to @Greg_Deckler  for your very quick and effective replies, and I will give some additions below:

1.Create the sample table.

vjiewumsft_0-1712714296737.png

2.Create the new measure to calculate value.

 

Value = 
VAR pro_ = SELECTEDVALUE('Table'[Product])
RETURN
IF(pro_ = "A1" || pro_ = "A2", 2, 
    IF(pro_ = "A3" || pro_ = "A4", 3, 
        IF(pro_ = "B1" || pro_ = "B2", 5, 6)
    )
)

 

3.Create the new measure to calculate total for category.

 

total sum = CALCULATE(SUMX('Table', 'Table'[Value]), ALLEXCEPT('Table', 'Table'[Category]))

 

4.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1712714405806.png

 

Best Regards,

Wisdom Wu

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

Greg_Deckler
Community Champion
Community Champion

@John-Cena88 This looks like a measure aggregation problem. See my blog article about that here: https://community.powerbi.com/t5/Community-Blog/Design-Pattern-Groups-and-Super-Groups/ba-p/138149

The pattern is:
MinScoreMeasure = MINX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
MaxScoreMeasure = MAXX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
AvgScoreMeasure = AVERAGEX ( SUMMARIZE ( Table, Table[Group] , "Measure",[YourMeasure] ), [Measure])
etc.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

I tried your solution and it does not work. It still displays the total split by Product. 

Anonymous
Not applicable

Hi @John-Cena88 ,

I provided the sample file above, try to use it. If the method is useful, please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Wisdom Wu

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.