Forum Discussion

Gelain's avatar
Gelain
Frequent Visitor
8 years ago
Solved

Filter values ​​by company

Hello!

 

I'm having trouble solving the following problem: I need to create a filter and graph to demonstrate how much each company has transferred and received from each other. For example: company 1 transferred to the company 2 US $ 4,000.00 and received the 3 US $ 500.00.

 

Thank you.

 

  • pxg08680

    Gelain

     

    My bad =oP applying Filter will solve the issue:

    • Received = CALCULATE(SUM(Sheet6[Sales]),FILTER(Sheet6,Sheet6[Extract] = "Received"))
    • Transferred = CALCULATE(SUM(Sheet6[Sales]),FILTER(Sheet6,Sheet6[Extract] = "Transferred"))

     

    Regards

    Abduvali

6 Replies

  • Abduvali's avatar
    Abduvali
    Skilled Sharer

    Hi Gelain,

     

    Just create 2 new calculated measures:

    1. Transferred = Calculate(SUM(YourTableName[Value]),YourTableName[Extract] = "Transferred")
    2. Received = Calculate(SUM(YourTableName[Value]),YourTableName[Extract] = "Received")

    And drop them into your table chart.

     

    Let me know if its what you were looking for.

     

     

    Regards

    Abduvali

    • pxg08680's avatar
      pxg08680
      Resolver III

      Abduvali

      According to your solution I see some extra data. Looking at this below image

      Table1 is raw data. By applying your formula and making the data into a table,

      The yellow marked Row seems to be an extra one becuase, take an example with ID Company 3::

       

      ID Compnay 3 has

      Receive 1000 which is row #4 GOOD.

      Transfer of 1000 and 500 which are row #4 and row #6 GOOD.

      But I don't understand the Row#5 which says Receive 1000 and transfer 1000 NOT GOOD. 

       

      • Abduvali's avatar
        Abduvali
        Skilled Sharer

        pxg08680

        Gelain

         

        My bad =oP applying Filter will solve the issue:

        • Received = CALCULATE(SUM(Sheet6[Sales]),FILTER(Sheet6,Sheet6[Extract] = "Received"))
        • Transferred = CALCULATE(SUM(Sheet6[Sales]),FILTER(Sheet6,Sheet6[Extract] = "Transferred"))

         

        Regards

        Abduvali