Forum Discussion
Group 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 STATE
Regards
Nagaraj
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.
4 Replies
- amitchandak
Super User
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.
- nagaraj
Post Patron
Hi Amit,
Thanks for the help, it worked 🙂
Regards
Nagaraj
- nagaraj
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
- FrankAT
Community Champion