Forum Discussion

franorio's avatar
franorio
Helper III
9 years ago
Solved

IF Function 2 conditions, count status

Hello everybody, I have the following question.

I have 3 columns: Manager; Scope & Status.

  • Column ¨Manager¨ shows if a person has an employee under his structure... if he has someone, it shows an ID, if not, its shown blank. (Values: An ID number/Blank)
  • Column ¨Scope¨ shows if the manager is in scope of the evaluation or not. (Values: ¨Yes¨/¨No¨)
  • Column ¨Status¨ shows if he has completed or not the training. (Values: ¨Completed¨/¨Not Completed¨)

I need to create a measure to count the amount of Status ¨Completed¨, if column manager is a ¨non blank¨, and also a Scpoe ¨yes¨.

 

Have been trying different type of formulas without positive outcomes.

 

Thanks & regards!

  • Phil_Seamark's avatar
    Phil_Seamark
    9 years ago

    But in the mean time try this : but add your table name where I have 'Table2'

     

    Measure = CALCULATE(
    			COUNTROWS('Table2') , 
    			FILTER(
    				'Table2',
    					'Table2'[Status]="Completed" 
    					&& 'Table2'[Scope]="Yes" 
    					&& NOT ISBLANK('Table2'[Manager])
    					)
    				)

5 Replies

  • Hi franorio

     

    Try this:

    [Measure] = CALCULATE( Countrows(YourTable), not ISBLANK(YourTable[Manager]),YourTable[Scope] = "Yes",YourTable[Status]="Completed")

    • Phil_Seamark's avatar
      Phil_Seamark
      Microsoft Employee

      But in the mean time try this : but add your table name where I have 'Table2'

       

      Measure = CALCULATE(
      			COUNTROWS('Table2') , 
      			FILTER(
      				'Table2',
      					'Table2'[Status]="Completed" 
      					&& 'Table2'[Scope]="Yes" 
      					&& NOT ISBLANK('Table2'[Manager])
      					)
      				)