Forum Discussion
Aggregate column values per Client Id in a matrix
Hello!
I am having a hard time dealing with this problem, really hope that someone can help me out.
--------------------------------------------------------------
Main goal is to be able to have a slicer with client id that filters the whole matrix , but when not using the slicer (when the selectedvalue(clientid)=blank()), i have to see the sum approveds for all clients , per manager id.
Context:
- For each ManagerId , i have client ids that have a TotalYearApproved, depending on the client.
- My goal is to aggregate the values of the TotalYearApproved column per client id, to be like this :
Being all aggregated , it gives 23.
The values per month are aggregated correctly , but the TotalYearApproved column isnt.
So i have a matrix table :
------------------------------------------------------------------------------------------------------------
The TotalYearApproved column already calculated before coming to powerbi :
I dont really know what to do in this case.
Thank you all for your patience and attention,
Ricardo
16 Replies
- lbendlin
Super User
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- devesqdeves
Helper II
lbendlin
Thank you for the reply , i created a sample pbix file explaining my problemYou can download it here :
- lbendlin
Super User
you were very close
AggregatedApproveds = var a = SUMMARIZE(DimManagerApproved,[ManagerName],[TotalYearApproved],[ClientId],"MonthY",sum(DimManagerApproved[Approved])) RETURN sumx(a,[MonthY])Don't forget that CALCULATE forces a context transition.