Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Calculate Problem

Hello,

 

I have a simple problem. 

I want to calculate the totals of the QuantityAllocated column according to each different container number

 

 

When I click on a row it gives the total number of all similar productID columns in the row. I dont want this. Should be 912

 

 

 

Thank you

 

6 Replies

  • Anonymous , what is the structure of your data.

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak 

      Sorry I can't share. I get the data from the database with direct query. What I want is the sum of the QuantityAllocated columns for according to each different container column.

      So; In the following filtering result, normally the Quantity Allocated quantity sum should be 39.720, but the result is 158.888 😞

       




  • Anonymous  - Try to  create a measure that will sum up values based on unique container ID:

    MEASURE = CALCULATE(SUM(Table[Values]),ALLEXCEPT(Table,Table[Container ID]))
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Tahreem24 

       

      It doesn't work.

       

       

       

      I just want this.

       

       

       

       

       

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Anonymous 

    Following on from Tahreem24  suggestion, If you are using a card visual, you will get a "total" unless you specify a specific ID in the filter expression or as a filter in the filter pane.

     

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support

    Hi Anonymous ,

     

    Do the columns in the table visual have unique values? Or is this table visual data from multiple tables?

    I create a table with unique values and use QuantityAllocated as the card visual. when click will display the value of the corresponding row.

     

    If the problem persists,could you using virtual data to create a sample pbix that fits your scenario and share it via cloud service like onedrive for business?

     

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.