Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

create a Measure based on filtering database for each item

Hi community,

 

I have a database with list of project/company and activity and I would like to make a measure that count the qty of projects with the same company and activity as below table .

 

would have any idea how to do this with powerBI ?

 

thank you for your support 

projectcompany activitymeasure
project1company1activity12
project2company1activity21
project3company2activity13
project4company2activity13
project5company1activity12
project6company2activity13

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    table in different format 

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      to clarify the result of the table:

      line 1: qty of projects with company1 and activity1=2

      line 2: qty of projects with company1 and activity2=1

      line 3: qty of projects with company2 and activity1=3

       

      ...

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Community 

       

      I m just following up on this request

       

      anyone have any idea on how to adress this issue

       

      thank you for your support

  • m3tr01d's avatar
    m3tr01d
    Icon for Continued Contributor rankContinued Contributor

    hello Anonymous,
    what about 

    CALCULATE(
       COUNTROWS( 'Table' ),
       ALLEXCEPT( 'Table', 'Table'[Activity], 'Table'[Company] )
    )