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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
sylvioros
Frequent Visitor

How to aggregate multiple records in a table?

Hi guys, I need your help. I've run out of attempts. It seems so simple, but I couldn't do it.

 

1) I  just need to sum/avg/max up all the values of a single record. 

 

For instance, I want 16 n_certif_B not 6 when I select a name in the table. Also, I want the average of '% total certif' for all 3 values (70,53%). How I do that? I've tried summarize(), but maybe because of the granularity of the table, it didn't aggregate when I select.

 

pbiquestion.jpg

 

2) My main goal is:

  1. show the average of % total certif for the record (in the example above, Alessandra).
  2. show the total of certif A + B, but the calculation should be sum(n_certif_A) + max(n_certif_B).

 

That shouldn't be so tricky. 😞

 

Hope to get some help here. Thanks!!!

3 REPLIES 3
sylvioros
Frequent Visitor

Anyone?

 

sylvioros
Frequent Visitor

Thanks for your reply @Sandhya1234, but it didn't work.

 

pbiquestion2.jpg

Please, note I'm working with relationships (2 tables in this scenario).

 

Also the values come from a fact table where the records values are 0 or 1, so in the example above, the value of 6 are 6 rows with 1s values summed up. That's why I'm having trouble with MAX, because it usually shows 1. 

 

Any other tip?

Sandhya1234
Helper II
Helper II

@sylvioros Try the below Measures.
Sum_n_certif_B = SUM(YourTable[n_certif_B])

Avg_Total_Certif = AVERAGE(YourTable[% total certif])

Max_n_certif_B = MAX(YourTable[n_certif_B])

Avg_Total_Certif_Selected = CALCULATE( AVERAGE(YourTable[% total certif]), FILTER(YourTable, YourTable[Name] = SELECTEDVALUE(YourTable[Name])) )

Total_Certif_A_B = CALCULATE( SUM(YourTable[n_certif_A]) + MAX(YourTable[n_certif_B]), FILTER(YourTable, YourTable[Name] = SELECTEDVALUE(YourTable[Name])) )


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.