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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
leandroduarte
Helper I
Helper I

Total per group

Dear Colleagues, I'm trying to make a total per group using this table structure, please let me know the best way to handle it

 

basically I want to display for each row the total of the group and year, not individual sum per type

 

YearGroupTypeQty Results Expected
2024AZ5000Group by A8200
2024AY3000Group by A8200
2024AI200Group by A8200
2024BI200Group by B200
2023AZ5000Group by A8000
2023AY3000Group by A3000
1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @leandroduarte 

 

Download example PBIX file

 

Use this measure

 

 

Measure = CALCULATE(SUM('DataTable'[Qty]), FILTER(ALL('DataTable'), 'DataTable'[Group] = SELECTEDVALUE('DataTable'[Group]) && 'DataTable'[Year] = SELECTEDVALUE('DataTable'[Year])))

 

 

sumgrp.png

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @leandroduarte 

 

Download example PBIX file

 

Use this measure

 

 

Measure = CALCULATE(SUM('DataTable'[Qty]), FILTER(ALL('DataTable'), 'DataTable'[Group] = SELECTEDVALUE('DataTable'[Group]) && 'DataTable'[Year] = SELECTEDVALUE('DataTable'[Year])))

 

 

sumgrp.png

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.