CHUN KIT LEE Posted July 27, 2021 Share Posted July 27, 2021 Hi everyone, I want to add a calculated column that count the records by [Date], for example : Table t1: Date | Calculated column -------------------------------------------------- 27/07/2021 | 2 27/07/2021 | 2 28/07/2021 | 1 29/07/2021 | 3 29/07/2021 | 3 29/07/2021 | 3 -------------------------------------------------- Can someone please tell me what should my expression be Thanks. Link to comment Share on other sites More sharing options...
Fabian Duerr Posted July 27, 2021 Share Posted July 27, 2021 You want to count in the [Date] column and aggregate by the same column: Count([Date]) over [Date] or Count() over [Date] Link to comment Share on other sites More sharing options...
CHUN KIT LEE Posted August 12, 2021 Author Share Posted August 12, 2021 It works! Thank you. What if I want to group by two columns, should it be : Count() over [Col_A] and [Col_B] Link to comment Share on other sites More sharing options...
Fabian Duerr Posted August 12, 2021 Share Posted August 12, 2021 Please try: Count() over ([Col_A],[Col_B]) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now