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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
bml123
Post Patron
Post Patron

Grand Total is not correct

Hi,

 

I have a matrix like this where amount is a measure. I am getting grand total incorrect as you can see.  There is some calculation in amount measure for Others.  It's ignoring the value for others.  I want to get 45 grand total.  How do I get the correct grand total?

 

EmployeeAmount
E110
E220
Others15
Total30
2 ACCEPTED SOLUTIONS

Which table is the Employee field in the visual coming from?

If it's the Employee table try:

AMOUNT =
SUMX (
    'Employee',
    CALCULATE (
        SWITCH (
            MAX ( Employee[Employee] ),
            "Others", DIVIDE ( 150, 10 ),
            DIVIDE ( [Target], [Num_weeks] )
        )
    )
)







Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

Hi @PaulDBrown ,

 

It worked. Thank you so much for the solution. 

View solution in original post

8 REPLIES 8
Samarth_18
Community Champion
Community Champion

Hi @bml123 ,

 

Create a another measure like this:-

measure= sumx(summarize('table','table'[employee],"Correct_Sum",[amount]),[Correct_Sum]))

 

 Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

PaulDBrown
Community Champion
Community Champion

Try:

Total amount = SUMX(Employee, [Amount])




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi @PaulDBrown 

 

I have tried your measue, it is not giving any values. It's just blank. 

I want the grand total in my matrix to have the correct value. 

 

Which table is the Employee field in the visual coming from?

If it's the Employee table try:

AMOUNT =
SUMX (
    'Employee',
    CALCULATE (
        SWITCH (
            MAX ( Employee[Employee] ),
            "Others", DIVIDE ( 150, 10 ),
            DIVIDE ( [Target], [Num_weeks] )
        )
    )
)







Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Hi @PaulDBrown ,

 

It worked. Thank you so much for the solution. 

Employee is coming from employee table

mh2587
Super User
Super User

Would you share the amount measure?


✔ Answered? Mark as solution |
Muhammad HasnainFabric • Power BI • Data Engineering |
LinkedIn

@mh2587 

Here is the formula of my Amount measure

Amount = SWITCH(CALCULATE(MAX(Employee[Employee])),
"Others",CALCULATE(150/10),
CALCULATE([Target] / [Num_weeks]))

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.