Forum Discussion

Raul09's avatar
Raul09
Advocate I
9 years ago

Wrong total column

Hi,

 

I'm having a problem were this measure gives wrong totals on a table visual 

 

= Cost SS Total = (([Over Stock]*'Unit Cost'[Unit Cost 2]))

 

Over Stock = ([Ideal]-[Total Available]) is a measure and Unit Cost 2 is a table column

 

The total is not calculating between rows wich gives the wrong results

 

Thanks in advance.

 

 

3 Replies

  • Hi Raul09,

     

    I don"t know how your data are stored but did you try Sumx( your table, (([Over Stock]*'Unit Cost'[Unit Cost 2])).

    Please give a sample with results and will try to help.

     

    Thx.

    • Raul09's avatar
      Raul09
      Advocate I

      thanks for your reply Interkoubess but that isn't working.

       

      My data comes from sql database in form of views,. i have a table for my SKU LIST so i can create relationships between all data.

       

      then i have this tables:
      - Inventory

      - Production

      - Sales

      - Cost

       

      i need to calculate my over stock cost by doing this:
      Total Stock = Available on Hand + In production

      Overstock = Total Stock - Avg Sales per month

      Overstock Cost = Overstock * Unit Price

       

      my first column on my table is my SKU, so every row have individual calculations for all of that.

       

      My row calculations are fine, but the totals is calculating between totals and not between rows

       

      • v-yulgu-msft's avatar
        v-yulgu-msft
        Microsoft Employee

        Hi Raul09,

         

        From current description, it's hard to image what expected result is and what wrong total values you have got. Please illustrate your scenario with sample data (table structure, column names, detailed rows). You could post some screenshots to show us current result you have got and tell us how to generate correct value with examples.

         

        Regards,
        Yuliana Gu