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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
vnicholl
Helper II
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
smpa01
Super User
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]))

 

smpa01_0-1637181061830.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
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
https://www.linkedin.com/in/excelenthusiasts/
smpa01
Super User
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]))

 

smpa01_0-1637181061830.png

 

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Thanks! I am trying both of these.

@vnicholl  did you try the above?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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