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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
prajwal1
Frequent Visitor

Different calculation for Totals of a matrix visual

Hi Guys,
I am stuck with a problem for a while and hope to get some help here.
For example my data is like.
I have FTE values per month per Scrum team.

prajwal1_0-1709136908625.png

I have a cost table and contains the cost per Team like below.
CRO-1 -- 12870

CRO-2 -- 16619
I need to calculate Actual cost per POD per month. ex: for CRO-1 and Month 2024-02 --> 2.81*12870=36165. and same for CRO-2 also. And the output is like.
prajwal1_2-1709137592085.png
If you can observe the above picture the total is not correct. It should be 36109+69373 = 105482.
It should take the values of CRO-1 and CRO-2 and give the sum in the Total, whereas it is calculating the Sum of FTE for both teams and multiply with average Cost of the teams. 
My measure is like below :

Forecasted cost =
VAR Capacity_demand_FTE = [Capacity demand (FTEs/Month) measure]
VAR Avg_gross_monthly_cost =
    CALCULATE(
        AVERAGE('Cost per POD'[Gross avrg monthly cost]),
        'Cost per POD'[POD] IN VALUES(Epics[Scrum Team])
    )
VAR ForecastedCost = Capacity_demand_FTE * Avg_gross_monthly_cost
RETURN ForecastedCost

Any help is appriciated. Thanks in advance
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @prajwal1 ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create measures. 

Measure = 
var _a=CALCULATE(SUM('cost'[cost]),FILTER(ALL('cost'),'cost'[Scrum team]=MAX('FTE'[Scrum team])))
var _b= _a*SUM('FTE'[FTE values])
RETURN _b
Measure 2 = IF(SELECTEDVALUE('FTE'[Scrum team])="Total",SUMX(FILTER(ALL('FTE'),'FTE'[Month]=MAX('FTE'[Month])),[Measure]),[Measure])

(3) Then the result is as follows.

vtangjiemsft_0-1709187898942.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @prajwal1 ,

 

According to your description, here are my steps you can follow as a solution.

(1) My test data is the same as yours.

(2) We can create measures. 

Measure = 
var _a=CALCULATE(SUM('cost'[cost]),FILTER(ALL('cost'),'cost'[Scrum team]=MAX('FTE'[Scrum team])))
var _b= _a*SUM('FTE'[FTE values])
RETURN _b
Measure 2 = IF(SELECTEDVALUE('FTE'[Scrum team])="Total",SUMX(FILTER(ALL('FTE'),'FTE'[Month]=MAX('FTE'[Month])),[Measure]),[Measure])

(3) Then the result is as follows.

vtangjiemsft_0-1709187898942.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.