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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jonassantos
Regular Visitor

group and display values ​​from a measure

I'm trying to sum the values ​​of a column generated from a measure.
the totalBycodeAlpha column is the measure that I'm trying to create, in it I'm trying to sum the values ​​of the value_calculated column (measure), grouped by the code-alpha column and display these values. But it turns out it's a lot harder than I thought...

does anyone know a way to solve this

link of project:
https://drive.google.com/file/d/14yUk7y-UfOY0f21ySWCqsGuctdVJMARM/view?usp=sharing

how i am trying to apply:

totalBycodeAlpha =
//total must sum the measure (value_calculated)  by code_alphA
CALCULATE(
    SUMX('base calculate',[maxValueOfProducts]),
    ALLSELECTED('base calculate'),
    FILTER('base calculate',
    'base calculate'[code-alpha]=MAX('base calculate'[code-alpha]))
)
 
 

 

 

table with dataset

 

jonassantos_0-1676819875678.png

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jonassantos , You need something like

 

CALCULATE(
SUMX('base calculate',[maxValueOfProducts]),
FILTER(ALLSELECTED('base calculate'),
'base calculate'[code-alpha]=MAX('base calculate'[code-alpha]))
)

 

 

or refer

Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
jonassantos
Regular Visitor

thanks, realy very good the result.

amitchandak
Super User
Super User

@jonassantos , You need something like

 

CALCULATE(
SUMX('base calculate',[maxValueOfProducts]),
FILTER(ALLSELECTED('base calculate'),
'base calculate'[code-alpha]=MAX('base calculate'[code-alpha]))
)

 

 

or refer

Latest
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.