Forum Discussion

iwuvwoo79's avatar
iwuvwoo79
Frequent Visitor
3 years ago
Solved

Sum Total is not correct

I have a calculation in my table to times the engineering scrap by the parts produced. When I do this, the total (for this example) is showing 4,336,023.7751. But when I export the data, it is showing 66,372.34 (which is the correct amount). I went through line by line in the table just to make sure all data was exported, each line is there and there are no additional lines or quantities.  

 

my dax is as follows:

Calculation = SUMX(V_INV_MSTR,V_INV_MSTR[Custom])*SUMX(V_WIP_DTL_HIST,V_WIP_DTL_HIST[Qty Comp Calc])
Qty Comp Calc = IF(V_WIP_DTL_HIST[RVRS_CODE]="R",V_WIP_DTL_HIST[QTY_COMPL]*-1,[QTY_COMPL])

 

What am I doing wrong or have set as a wrong setting????

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi @tomsmith213 ,

    You can create another new measure as below and put this new measure to replace the original measure [Calculation] onto the table visual...

    New Measure =
    SUMX (
        GROUPBY (
            'V_INV_MSTR',
            'V_INV_MSTR'[Year],
            'V_INV_MSTR'[Month],
            'V_INV_MSTR'[Day],
            'V_INV_MSTR'[Shift],
            'V_INV_MSTR'[Part Number],
            'V_INV_MSTR'[Loc]
        ),
        [Calculation]
    )

     

    In addition, you can refer the following links to try to solve your problem...

    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 ones can't help you get the desired result, please provide some sample data in your tables(exclude sensitive data) with Text format, the visual Fields settings and your expected result with backend logic and special examples. 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

7 Replies