Forum Discussion

jsanchez8's avatar
jsanchez8
Regular Visitor
1 year ago

Different Totals depending on fields

I am getting different amount totals when using the same measure in two different table visuals. Both visuals are affected by an employee slicer and a Gross is not $0 filter.

 

RefAmount:

Referral Amt =
CALCULATE(
            SUM('ProjectAmounts'[ProjectRefAmount]),
             FILTER('ProjectAmounts', 'ProjectAmounts'[Currency Number]=RELATED('Emp'[CurrencyNumber]))

 

EmpGross Dax:

EmpGross = CALCULATE(
    SUM('ProjectAmounts'[Project Period Gross]),
     FILTER('ProjectAmounts', 'ProjectAmounts'[Currency Number]=RELATED('Emp'[CurrencyNumber]))
)


Table visual A: I have project number and amount columns. 

 

Table B: I have employee and Amounts columns. 

 

When slicing on a specific employee, the totals are different. 

3 Replies

  • 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-Forum/ba-p/963216
    Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thank you lbendlin 

    Hi, jsanchez8

    The results vary in different visuals and depend on your external row labels, which filter the data.
    To illustrate the problem, I've created the following sample data:

    Your DAX expression looks correct and you can check your data. Two Tables always have the same result if there is a relationship, if your data is correct. It depends on the specific line context.

    You can check the following to find out why the results are not the same:
    1. Check that your relationship is set up correctly.
    2. Check if there are other contexts (such as slicers, filters in the filter panel, etc.) that are affecting the results.
    3. Ensure data integrity and ensure that the table on the first end contains all records on multiple ends. Avoid problems that create incomplete referencing.

    If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
    Thank you for your patience and look forward to hearing from you.

     

     

    Best Regards

    Jianpeng Li

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

     

     

     

     

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, jsanchez8 

    I wish you all the best. Previously we have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
    If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
    If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
    Thank you for your patience and look forward to hearing from you.

     

     

    Best Regards

    Jianpeng Li