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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
reynaldo_malave
Helper III
Helper III

Aggregation on Matrix

Hi Guys,

 

I am trying to aggregate a measure on a matrix column. This is what it looks like now. But I want it to be aggregated as you go up the matrix

 

reynaldo_malave_0-1616427918669.png

I am using the following measure :

Costo Oportunidad = 

var precio_producto =

    LOOKUPVALUE(
        DM_productos[pvp],
        DM_productos[simi_code],
        SELECTEDVALUE(
            DM_productos[simi_code]
        )
    )

return

IF(
[Brecha]<0,
[Brecha] *-1*precio_producto
)

 Thanks,

Reynaldo

2 REPLIES 2
amitchandak
Super User
Super User

@reynaldo_malave ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. And logic what are you trying to achieve here

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

Hi @amitchandak 

 

Thanks man, you can download de pbi sample file here

 https://farmaciasdesimilares-my.sharepoint.com/:u:/g/personal/inreynaldo_porunpaismejor_com_mx/Ecv0X...

 

 

What I am trying to achive is an aggregation on column [Costo de Oportunidad]. Take a look at the image i shared and notice how all columns are aggregated but the last one. First one adds up 57 then the second 50 and the third one 7. I want to be the same with the last one.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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