cancel
Showing results for
Did you mean:

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Frequent Visitor

total sum value in table visual is wrong

im trying to calculate the total commission by all salespersons. i have 2 tables , one table shows the commission by catgory and the other table shows sales transactions by salespersons.

i created a joining column in power query by concatenating 3 columns in the packages table to have 1 unique key in the tabel so that i can join with the other table.

after i joined the two tables with 1 to many relationship and cross filteting

then created a table visual that shows :

agent name - categoty-sales-commission value

the sales total is correct but the commission is not correct. the commission is taken from the categories commission table and the rest of columns are from the categories transactions table.

the correct total commission should be much higher=973.605

any idea of what could lead to wrong total sum value while value per row is correct

1 ACCEPTED SOLUTION
Super User

Total Commission =
SUMX (
SUMMARIZE (
'categories trans',
'categories trans'[AGENT_NAME],
'categories trans'[Category]
),
CALCULATE ( SUM ( 'categories trans'[Commission] ) )
)

4 REPLIES 4
Community Support

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

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

Hi @tomsmith213 ,

You can create another new measure as below and put this new measure to replace the original measure [Sum of Commission] onto the table visual. Later check if it can return the correct total values...

``Sum of Commission = SUM('categories commisions'[Commission']``
``````New Measure =
SUMX (
GROUPBY (
'categories trans',
'categories trans'[AGENT_NAME],
'categories trans'[Categoty]
),
[Sum of Commission]
)``````

Why Your Total Is Incorrect In Power BI - The Key DAX Concept To Understand

Dax for Power BI: Fixing Incorrect Measure Totals

If the above one can't help you, could you please provide more raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User

Total Commission =
SUMX (
SUMMARIZE (
'categories trans',
'categories trans'[AGENT_NAME],
'categories trans'[Category]
),
CALCULATE ( SUM ( 'categories trans'[Commission] ) )
)

Super User

Hi,

This is a quite common issue. I recommend reading this article to understand the cause of it: Obtaining accurate totals in DAX - SQLBI

Additionally it is generally speaking not a good idea to have a "both" directions realtionship between your tables. Try to change the realationship to "single" between your tables. Additionally if you just want to have total disregarding filters use ALL in your dax. E.g. CALCULATE(SUM(Table[column]),ALL(Table))

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

Proud to be a Super User!

Announcements

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors