none
Total summary not correct RRS feed

  • Question

  • Hi, 

    I am trying to calculate quantity with one exception. but when it comes to the total, it looks like the exception is skipped and the summary is not correct.
    I have created 2 measures as below:

    Pre Quantity :=
    SWITCH(FIRSTNONBLANK(DimTable1[Code],DimTable1[Code]),
    "E4606", SUMX(DimTable2,DimTable2[Unit Per Pack]*[UnitOfConversion])*[Local Sales],
    SUMX(DimTable2,DimTable2[Unit Per Pack]*[Manufacturing Sales])/[UnitOfConversion]
    )

    Quantity:=SUMX(VALUES(DimTable2[Unit Per Pack]),[Pre Quantity])

    In row level the calculation works for each case but the summary will show wrong, as the exception didn't exist.
    Very much appreciated your help.
    //Klaudia
    Tuesday, February 12, 2019 11:26 AM

Answers

  • Since your SWITCH logic depends on DimTable1[Code], your Quantity measure should include an iteration over that column, while now it only iterates over VALUES(DimTable2[Unit Per Pack]).

    Expect me to help you solve your problems, not to solve your problems for you.

    Tuesday, February 12, 2019 1:27 PM

All replies

  • Since your SWITCH logic depends on DimTable1[Code], your Quantity measure should include an iteration over that column, while now it only iterates over VALUES(DimTable2[Unit Per Pack]).

    Expect me to help you solve your problems, not to solve your problems for you.

    Tuesday, February 12, 2019 1:27 PM
  • Thank you for your help, it works !


    Tuesday, February 12, 2019 3:44 PM
  • Hi  KlaudiaD,

    So it seems that you solve your problem, right? If so and if you'd like to, you could mark corresponding post as answer or share your solutions. That way, people who in this forum and have similar issue will benefit from it.


    Thanks for your understanding and support.
    Best Regards,
    Zoe Zhi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, February 13, 2019 1:31 AM