Forum Discussion
How to Calculate Count by One Column with where condition of another column in Power BI?
- 7 years ago
hi, Dhruvin
You could use this formula as below:
document Count by Transaction Originator = CALCULATE(COUNTA('Table'[document Number]),ALL('Table'[User ID]),'Table'[Transaction Originator] in VALUES('Table'[User ID]))+0Best Regards,
Lin
Thnaks for your effort.
I really appriciate it.
I am looking for different o/p.
As per your output User ID and Document Count by User Id is correct. But for Document Count by Transaction Originator I'm looking for the output something like below:
For User ID - A001 - document Count by Transaction Originator should be = 3 instead of 2. I need all the count of Document by Transaction Originator but only want to represent wrt UserID.
Same, UserID - A002 document Count by Transaction Originator should be = 5 instead of 3.
I know it's bit confusing.! Hope you understand.
hi, Dhruvin
You could use this formula as below:
document Count by Transaction Originator = CALCULATE(COUNTA('Table'[document Number]),ALL('Table'[User ID]),'Table'[Transaction Originator] in VALUES('Table'[User ID]))+0
Best Regards,
Lin
- Dhruvin7 years ago
Helper III
v-lili6-msft - Thanks a lot. That's what I'm looking for. Big thanks to you.