Forum Discussion
nagaraj
Post Patron
6 years agoGroup BY and COUNT
Hi All, Need help with the DAX for the below scenario. I have column (STATE) in a table , now i need to create a measure called STATE_COUNT. Data for the new column will be count of each STA...
- 6 years ago
Try like
calculated(count(table[state]),allexcept(table[state]))
Also refer : https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/
Appreciate your Kudos.
amitchandak
Super User
6 years agoTry like
calculated(count(table[state]),allexcept(table[state]))
Also refer : https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept/
Appreciate your Kudos.
- nagaraj6 years ago
Post Patron
Hi Amit,
Thanks for the help, it worked 🙂
Regards
Nagaraj
- nagaraj6 years ago
Post Patron
For the below scenario, let's say i have a country column as well.
And lets say BANGALORE is part of COuntry 1 and Country 2 ... i need to count seperately based on Coutnry.
At present, the expression is counting all BANGALORE regardless of the Country.
Any Idea?
Regards
Nagaraj