I have this Table A:
ITEM | DATE | COUNT |
---|---|---|
A | 04.11.2021 13:38:51 | 1 |
A | 04.11.2021 08:07:44 | 1 |
A | 04.11.2021 08:07:42 | 1 |
A | 04.11.2021 13:53:28 | 1 |
B | 22.10.2021 21:14:19 | 1 |
B | 22.10.2021 16:18:09 | 1 |
B | 22.10.2021 18:15:11 | 1 |
C | 06.11.2021 22:08:46 | 1 |
And i would like to Group and count the item by Date (no time) like this: |ITEM|DATE|COUNT| |----|----|-----| |A|04.11.2021 |4| |B|22.10.2021 |3| |C|06.11.2021 |1|
CodePudding user response:
That would be:
Select
[Item],
DateValue([Date]) As ItemDate,
Sum([Count])
From
[Table A]
Group By
[Item],
DateValue([Date]) As ItemDate
CodePudding user response:
method1:
Change the DATE format to yyyy-mm-dd or each other Date format.
Then change in Values DATE from Don't summarize to Earliest or Lastest.
This method will change the DATE format from Datetime to Date and will also change in other Visuals formats. If you used Date base on datetime in other visuals, the problem is happened.
method2:
Create a new column(_date = 'Table A'[DATE].[Date]
) or new measure(_date= max('Table A'[DATE].[Date])
), and use it instead of DATE in the visual.
You can also use _COUNT=COUNT('Table A'[DATE])
instead of COUNT.