cancel
Showing results 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.

Helper II

## Grouping items with totals

Hi,

I have data that is something like this (dept, group, money coming in columns):

01234A, 2000, \$3

01234A, 2060, \$5

01236B, 2000, \$4

01236B, 4000, \$5.

I want to group the totals for the depts and the groups, so I would have 01234A would be \$8 (3 + 5), 01236B would be \$9 (4+5) and then 2000 would be \$7 (3 + 4) and 2060 and 4000 would be \$5 each.

How can I do that in Power BI desktop?

1 ACCEPTED SOLUTION
Super User

@vnicholl  you need two measures

``````byDept = CALCULATE(SUM('Table'[money]),ALLEXCEPT('Table','Table'[dept]))
bygroup = CALCULATE(SUM('Table'[money]),ALLEXCEPT('Table','Table'[group]))``````

Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
4 REPLIES 4
Super User

Hi,

Depending upon which fields you drag to the visual, a SUM measure should work

Measure = sum(Data[Money])

Hope this helps.

Regards,
Ashish Mathur
http://www.ashishmathur.com
Super User

@vnicholl  you need two measures

``````byDept = CALCULATE(SUM('Table'[money]),ALLEXCEPT('Table','Table'[dept]))
bygroup = CALCULATE(SUM('Table'[money]),ALLEXCEPT('Table','Table'[group]))``````

Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Helper II

Thanks! I am trying both of these.

Super User

@vnicholl  did you try the above?

Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Announcements

#### 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

#### Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

#### Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors