Forum Discussion
Count rows based on measure
mb0307 add following measure for the count
Count Yes Measure = COUNTX ( VALUES ( Table[Customer] ), IF ( [New Customer] = "Y", 1 ) ) Count No Measure = COUNTX ( VALUES ( Table[Customer] ), IF ( [New Customer] = "N", 1 ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
2 Replies
- parry2kSuper User
mb0307 add following measure for the count
Count Yes Measure = COUNTX ( VALUES ( Table[Customer] ), IF ( [New Customer] = "Y", 1 ) ) Count No Measure = COUNTX ( VALUES ( Table[Customer] ), IF ( [New Customer] = "N", 1 ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
- mahoneypatMicrosoft Employee
It is possible to do lots of things in measure w/o the use of calculated columns. It looks like you are trying to calculate new customers. Here is a link with one way to do that. If you provide example data, a specific measure can be provided.
https://www.sqlbi.com/articles/computing-new-customers-in-dax/
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat