Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Total Sum Not adding up for specific rows

Hi, Need Help. My total sum for my Total Cost Column adds up correctly for 40HC "container size" but not for 40FT "container size". I am using one formula for my Total Cost column which is 

Total Cost = [Shipment Count] * SUM('FCL Pricing'[FCL Price]). The total cost for 40FT somehow is double the correct answer. See picture below. I also tried to just multiply HBL count or shipment count by FCL price and it still just doubles the cost only for 40FT. Any idea how to solve this?
 

  • Anonymous 
    If that is not possible we have to force a row contxt like

    Sumx(Summarize(Table, Table[Origin], Table[Container Size], Table[CBM],Table[Shipment Count], "_max",Max('FCL Pricing'[FCL Price])),[Shipment Count]*[_max])

     

    I can not tell you the best combination without looking at data. What all should be there in the group by of summarize

    Should max be there Max/Average/SUM etc for 'FCL Pricing'[FCL Price]

6 Replies

  • Anonymous 
    If that is not possible we have to force a row contxt like

    Sumx(Summarize(Table, Table[Origin], Table[Container Size], Table[CBM],Table[Shipment Count], "_max",Max('FCL Pricing'[FCL Price])),[Shipment Count]*[_max])

     

    I can not tell you the best combination without looking at data. What all should be there in the group by of summarize

    Should max be there Max/Average/SUM etc for 'FCL Pricing'[FCL Price]

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you all for your help. Amitchandak's formula solved it. Thank you Amitchandak.

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    Is this problem solved?

     

    If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


    If not, please share me a dummy PBIX file, removing sensitive information.

     


    Best Regards,
    Icey