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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Swiya
Frequent Visitor

Totals in Matrix visual showing wrong total

I have a measure that calculates the cost of each employee per month by dividing the total cost by the number of month they are available for this year.

Following is the measure:

var capacity = CALCULATE(SUM('SAI Med Capacity Analysis 2025'[2025 RealCapacity ]),ALL('Month Table with weeks'))/CALCULATE(COUNT('SAI Med Capacity 2025 monthly'[Value]),ALL('Month Table with weeks'))

var result =
SUMX(
    CALCULATETABLE(VALUES('SAI Med Capacity 2025 monthly'[Name ]),ALL('Month Table with weeks')),
    CALCULATE(
    sumx(
           FILTER(
                'Month Table with weeks',
                MAX('SAI Med Capacity 2025 monthly'[Value]) = "X"),
                 
            capacity
    )
    )
)
   

return result
However, the measure is not giving the correct column total in a matrix visual. Here is the screenshot for the same:
Swiya_0-1742891279163.png

Any help would be appreciate. Thanks is advance

1 ACCEPTED SOLUTION

Hi @v-achippa

This is resolved but I didnt get much help on the same topic

What I discovered was that the sumx doesnt work in the same measure where you calculate the it. I created another measure and calculated sumx there and the totals came out to be correct.

Let me know if i mark this as resolved

View solution in original post

6 REPLIES 6
v-achippa
Community Support
Community Support

Hi @Swiya,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @lbendlin for the prompt response.

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the issue is resolved? If not please provide some sample data that covers your issue so that we can look more into it and provide you the best solution possible. Let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @Swiya,

 

We wanted to kindly follow up to check if the issue is resolved? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @v-achippa

This is resolved but I didnt get much help on the same topic

What I discovered was that the sumx doesnt work in the same measure where you calculate the it. I created another measure and calculated sumx there and the totals came out to be correct.

Let me know if i mark this as resolved

Hi @Swiya,

 

Thank you for the response and confirming that the issue is resolved. If possible could you please provide the measure/solution and accept it as a solution so that other community members will find it more easily. If not, please accept the above post as a solution. 

 

Thanks and regards,

Anjan Kumar Chippa

Hi @Swiya,

 

As we haven’t heard back from you, we are closing this thread for now. If you have any further issue, please raise a new thread in the community forum, we are ready to assist you on it.

Thank you for being part of Microsoft Fabric Community.

 

Thanks and regards,

Anjan Kumar Chippa

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.

Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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