Forum Discussion

icturion's avatar
icturion
Resolver II
8 years ago
Solved

countrow value by group

Hi,

 

The intention is to present the number of examinations per month with the number of times that a study had been supplemented positively with the percentage of the number of positive results in relation to the number of examinations.

 

In the example below, column ID_NUMERIC is the examinations number. Column DESCRIPTION is the name of the survey and if the result positive. 

 

Does anyone have an idea how to best handle this in power bi?

 

Explain column DESCRIPTION values:

Onderzoek-1 en onderzoek-2 are the examinations

Positief tell’s if an examination returned positive

 

 

  • Hi icturion

     

    Try these MEASURES

     

    Total # of Exams = Calculate(Countrows(TableName),TableName[DESCRIPTION]="Onderzoek-1")
    
    
    Total # of Positives = Calculate(Countrows(TableName),TableName[DESCRIPTION]="Positief")
    
    
    %age = [Total # of Positives]/[Total # of Exams]
  • Hi,

     

    Try this

     

    Total # of Exams = Calculate(Countrows(TableName),TableName[DESCRIPTION]="Onderzoek-1"||TableName[DESCRIPTION]="Onderzoek-2")

     

    Hope this helps.

5 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Hi icturion

     

    Try these MEASURES

     

    Total # of Exams = Calculate(Countrows(TableName),TableName[DESCRIPTION]="Onderzoek-1")
    
    
    Total # of Positives = Calculate(Countrows(TableName),TableName[DESCRIPTION]="Positief")
    
    
    %age = [Total # of Positives]/[Total # of Exams]
    • icturion's avatar
      icturion
      Resolver II

      Hi Zubair_Muhammad

       

      thank you for the quick respons. 

       

      how can I add two different studies in the first measure?values ​​are onderzoek-1 and onderzoek-2

       

       

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

         

        Try this

         

        Total # of Exams = Calculate(Countrows(TableName),TableName[DESCRIPTION]="Onderzoek-1"||TableName[DESCRIPTION]="Onderzoek-2")

         

        Hope this helps.