Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Total filtered by column and date

Hello,

In a table I have all the pieces done by a production machine. Each piece is related to a Run ID (Run column). For the date selected with the slicer, I want to be able to calculate the sum of Vol_used for all the pieces of the same Run. Sometimes one L.wanted can be related to more than one Run (Like 31 and 30 in the example).

Here is the expected result:

I share the pbi files: https://www.dropbox.com/s/s9nmmfhr7wn47ui/TEst_BI.pbix?dl=0 

Thank you

 

2 Replies

  • vanessafvg's avatar
    vanessafvg
    Icon for Community Champion rankCommunity Champion

    something like this?

     

    runmeasure =
    SUMX ( VALUES ( tablename[Lwanted] )SUM ( table[volume] ) )

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi,

      There is the formula that give me the expected result. 

       

      CALCULATE(SUMX(VPIECE;VPIECE[Vol_used]);VALUES(VPIECE[Run]);ALLEXCEPT(VPIECE;VPIECE[Run];VPIECE[DATE]))

       

      But in my real table it doesn't work because it says that there is too many parameters and the server allow a maximum of 2100. So I need something else. Any idea will be welcome!

      Thank you