Forum Discussion

Etienne_1995's avatar
Etienne_1995
Frequent Visitor
2 years ago
Solved

calculate correct sum with duplicates

 

Hi

 

I am trying to solve the problem in a DAX-measure, that I get the correct sum of the delivered amount.

I have duplicates within the column delivery number, because of additional data, which is required. But I only want the sum of the delivery amount once per delivery nr.

 

I have attached an example.

 

I already tried it with this dax-measure. But I still get 2000 instead of 1000. Could someone help me to solve this issue?

gelieferte Menge Wareneingang =
SUMX(
    SUMMARIZE(
        ETL_OTD,
        ETL_OTD[WEK_BelegNummer],
        "SUM",
        sum(ETL_OTD[WE2_Liefermenge])
    ),
    [SUM]
)
 
 
Thank you very much! 
  • zenisekd's avatar
    zenisekd
    2 years ago

     

     Kudos and mark as solution appreciated 🙂

4 Replies

  • Etienne_1995 You should define some condition, which will tell based on which you will sum these. How do you recognize which rows you want to sum the value on a single order?

  • Etienne_1995's avatar
    Etienne_1995
    Frequent Visitor

    Hi zenisekd

     

    I updated the screenshot.

    So i would like to only sum up the delivery amount per distinct delivery nr.
    Here for example. the supplier delivered the amount of 843 with the delivery number 45.
    When I sum it up I don't want to have 843 twice. The same with the delivery nr 46. Does that help you to be able to answer my question?

    • zenisekd's avatar
      zenisekd
      Icon for Super User rankSuper User

       

       Kudos and mark as solution appreciated 🙂