Forum Discussion
jeffs9876
9 years agoNew Member
CountIFS to Calculate Payment Number
Hello, I have a table (Table A) where I am storing a userID, productID and paymentDate. I would like to use something similar to a countifs statement from excel to add another column with the pay...
- Anonymous9 years ago
jeffs9876,
In Power BI Desktop, create a calculated column using the following DAX.paymentNumber = CALCULATE(COUNTA(TableA[productID]),FILTER(TableA,TableA[userID]=EARLIER(TableA[userID])&&TableA[productID]=EARLIER(TableA[productID])&&TableA[paymentDate]<=EARLIER(TableA[paymentDate])))
Regards,
Anonymous
9 years agoNot applicable
jeffs9876,
In Power BI Desktop, create a calculated column using the following DAX.
paymentNumber = CALCULATE(COUNTA(TableA[productID]),FILTER(TableA,TableA[userID]=EARLIER(TableA[userID])&&TableA[productID]=EARLIER(TableA[productID])&&TableA[paymentDate]<=EARLIER(TableA[paymentDate])))
Regards,
jeffs9876
9 years agoNew Member
Thank you