Skip to main content
cancel
Showing results for 
Search instead 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.

Reply
bmdailey
Regular Visitor

Joined Data Repeats SUM for Each Line

Hello,

 

As this is my first post, please pardon me if it's not quite the standard, but I promise to adapt and catch up quick. I performed a search on other forums within the Power BI message board, but was unable to find an exact match. Please review the associated mockup of this scenario.

 

Long story short, I have 2 tables that I am using to report project statuses. "Table1" contains a single line for Project#, Costs$ & Budget$. "Table2" contains multiple lines for "SER#" (*key/join), Resource & Billed$.

 

When I join and report the dollars spent, the final report lists each line and repeats the Billed $ value for each line. The goal is for the Billed $ to show a unique SUM by Project#, instead of showing the grand total of $250 and repeating.

 

Please advise if there are any clarifying questions that I need to answer.

 

Thanks for the help,

ByronPBI_Repeat_Sum.jpg

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@bmdailey,

 

You could use the following DAX to add a meausre.

Measure =
VAR ProjectId =
    MAX ( Table1[Project#] )
RETURN
    CALCULATE (
        SUM ( Table2[Billed] ),
        FILTER ( Table2, Table2[SER#] = ProjectId )
    )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greetings,

Thank you. I'll create & incorporate this measure into my query this morning & provide the results. The DAX makes sense as it should return the Max Value (*SUM) of the column (ie. if John is billing $150 for 5 business days, it should return SUM of $150 & not SUM of total billed for all resources).

Many regards,

Byron D
fhill
Resident Rockstar
Resident Rockstar

When looking at your Relationsihips, under 'Managed Relationships', make sure everything is set to BOTH under the Cross Filter option.  For smaller data sets this just makes joining easier.

 

Forrest




Did I answer your question, or help you along the way?
Please give Kudos or Mark as a Solution!


https://www.linkedin.com/in/forrest-hill-04480730/

Proud to give back to the community!
Thank You!




Hi Forest,

Thanks for the heads up. I verified the that the Cross Filter was set as "Both". Interesting enough, I am able to reproduce the multiplier effect using just a few sample rows/columns as provided in the problem statement (*as my original tables have many more).

Thank you,

Byron D

Helpful resources

Announcements
Microsoft Fabric Learn Together

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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