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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sinanalmac
Resolver I
Resolver I

Matrix Table SubTotal

Hi All, 

 

I have Two tables 

 

One's name v_PBI_CEScoreCard_CERegion and colums are; 

RepPointName, SalesRepName, PersonalCost

The other one  is Dim_RepPoint  and its colums are 
RepPointName, RepPointCost
I create  a relationship  between these two tables using by RepPointName Column. 
sinanalmac_1-1679573231459.png


I want to create a mesure  for a maxrix visuals Row SubTotals . And I create This:

TotalCost With RepPoint = SUM(v_PBI_CEScoreCard_CERegion[PersonalCost]) + SUMX(VALUES(v_PBI_CEScoreCard_CERegion[RepPointName]), LOOKUPVALUE(Dim_RepPoint[RepPointCost], Dim_RepPoint[RepPointName], v_PBI_CEScoreCard_CERegion[RepPointName]))

This one is showed right calculation at the row subtotals.  but  it also add  RepPointCost    for every SalesRep by row . I just want to see RepPointCost  into to subtotal . Can you  helpme  about it?

Here  is  example about it

sinanalmac_3-1679574314889.png

 

 

Total are  correct but   rows are not.   

Best Regards
Sinan 



2 REPLIES 2
amitchandak
Super User
Super User

@sinanalmac, Try a change like

 

TotalCost With RepPoint = SUM(v_PBI_CEScoreCard_CERegion[PersonalCost]) + SUMX(v_PBI_CEScoreCard_CERegion[RepPointName], Maxx(Dim_RepPoint[RepPointCost], Dim_RepPoint[RepPointName], v_PBI_CEScoreCard_CERegion[RepPointName]))

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

Hello , 

 

Thank you @amitchandak . 

Your code was made an erorr. I Couldn't provide the second argument

sinanalmac_0-1679603106930.png

 

I inspired your code and wrote this but it also wasn't worked 😞

TotalCost With RepPoint = SUM(v_PBI_CEScoreCard_CERegion[PersonalCost]) + 
  CALCULATE(MAX(Dim_RepPoint[RepPointCost]), 
    FILTER(Dim_RepPoint, 
      Dim_RepPoint[RepPointName] IN VALUES(v_PBI_CEScoreCard_CERegion[RepPointName])
    )
  )


 regards

Sinan

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.