0
votes

I'm new to power BI and trying to create a new column similar to this formula in excel:

=**IF(COUNTIFS(D:D,[@[FIVE9_AGENT_NM]],E:E,[@[FIVE9_CALL_SKILL]],C:C,[@[FIVE9_ANI]],H:H,"<"&[@[Date & Time]],H:H,">="&[@[Date & Time]]-5),0,1)**

Im stuck at this point not knowing how to convert the column to refer the row cell in the countif formula for example =COUNTIFs(H:H,H2,A:A,A4) would be easy to achieve in excel not sure now to reference the a cell in powerBi.

I have a table

Call_Dt| Five9_CALL_TIME| FIVE9_ANI| FIVE9_AGENT_NM| FIVE9_CALL_SKILL
_______|________________|__________|_______________|_________________

8/28/19|     12:23:07   |222333777 |      JOHN     |  Billing

I want to create a new column which counts the records having the criteria n the excel formula above.

Any help on this will be greatly appreciated.

Thanks in advance!

1
Welcome to SO! When you place a question try to add a minimum content: input sample, expected output sample, what did you try, research and where are you stacked. Please, add some screenshots of your input and desired output. - David GarcĂ­a Bodego
What is your criteria to count? I am not sure what your Excel formula means. Do you want a overall count like a total sum (1 value) or do you want a new column where in each row is a 1 or 0 and you get the total in the chart? - Strawberryshrub

1 Answers

0
votes

Use CALCULATE along with FILTER:

Measure = 
   CALCULATE(
      COUNT([column]).
      FILTER(
         [table], 
         //your filter conditions
      )
   )

Find more about these functions here: Calculate, Filter