Forum Discussion
Anonymous
4 years agoNot applicable
Converting Excel Countif
Hello Team, I am new to Power BI. I trying to convert the excel formula to DAX. Count Cases Last 31 =COUNTIFS(A:A,$A2,C:C,$C2,B:B,">="&$B2-30) Sample data is below: Cust Site ID Case Crea...
- 4 years ago
There are lots of ways to do this. I'd suggest something like this as a calculated column:
CountIf = VAR CurrRowDate = Table1[Case Create Date Time] RETURN CALCULATE ( COUNTROWS ( Table1 ), ALLEXCEPT ( Table1, Table1[Cust Site ID], Table1[Case Type] ), Table1[Case Create Date Time] >= CurrRowDate - 30 )
AlexisOlson
Super User
4 years agoThere are lots of ways to do this. I'd suggest something like this as a calculated column:
CountIf =
VAR CurrRowDate = Table1[Case Create Date Time]
RETURN
CALCULATE (
COUNTROWS ( Table1 ),
ALLEXCEPT ( Table1, Table1[Cust Site ID], Table1[Case Type] ),
Table1[Case Create Date Time] >= CurrRowDate - 30
)
- Anonymous4 years agoNot applicable
Thank you for your help.