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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Incorrect Total in Table

Hi guys, 

 

I have exactly the same problem shown in the example below.

 

KARINEALMEIDA_2-1617853872542.png

The TOTAL is not adding up the 'duplicate' values in the table (In the example: 3+3+5+5+2 = 18). The TOTAL is only considering the values of the data source (In the example: 3+5+2). 

 

How can I resolve this?

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , make sure you are using sales person from table1 and then check

 

else try this measure

sumx(summarize(Table1,Table1[Date], Table1[Sales Person], "_1", sum(Table2[Amount]])),[_1])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Guys, 

 

Thanks a lot! I'm trying to add colums from a third table. I tried to use the SUMX function, but didn't work. 

 

Can you help me one more time?

 

KARINEALMEIDA_0-1618029814889.png

I'm attached a sample of my work in: https://www.dropbox.com/s/rki4vf4jsxgujo6/Karine_Almeida.pbix?dl=0

 

 

Hi, @Anonymous 

I do not know what is the logic how to calculate those, but I just tried to simply multiply two values.

Please check the measures down below. If the logic is incorrect, then you can simply change the multiplier to your correct logic.

 

HS AS Total =
SUMX (
RELTMS,
RELTMS[Hours]
* LOOKUPVALUE (
Actuals__022021[HS A/S],
Actuals__022021[%Chave_RELPRJ], RELTMS[%Chave_RELPRJ]
)
)
 
Sizing Total =
SUMX (
RELTMS,
RELTMS[Hours]
* LOOKUPVALUE (
Actuals__022021[SIZING],
Actuals__022021[%Chave_RELPRJ], RELTMS[%Chave_RELPRJ]
)
)
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please correct me if I wrongly understood your question.

In my opinion, the first table is a Fact Table, and the second table is a Dim-Table. And those have *-1 relationship.

And the amount is inside the Dim-Table.

In this way, the amount is only duplicated because of the fact table's structure. So, the number is correctly shown.

If this has to be fixed, then try to write a measure like below.

 

Please also check the sample pbix file's link down below.

 

measures = SUMX('Table', RELATED(Table2[Amount]))
 
Picture2.png
 
 

Hi, My name is Jihwan Kim.

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Visit my LinkedIn page by clicking here.


Schedule a meeting with me to discuss further by clicking here.

amitchandak
Super User
Super User

@Anonymous , make sure you are using sales person from table1 and then check

 

else try this measure

sumx(summarize(Table1,Table1[Date], Table1[Sales Person], "_1", sum(Table2[Amount]])),[_1])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.