Forum Discussion
Group by Date, without Timestamp
Hi all,
I'm experiencing a problem with grouping data, which contains also timestamp. Currrent situation is presented below, as you can see, data is not summed up for the same day, due to having timestamp.
| SUM | DATE |
| 32 | 01.sty |
| 423 | 01.sty |
| 12 | 02.sty |
I would like this days to be summed up. I don't want to create separate calculated columns, and don't want to change datatype of this columns, I would like to resolve it with measure. I've tried using Measure with MAX function with .[Date] setting, but I receive error that the column I'm using, doesn't contain date.
Any suggestions, how this issue related to summing up can be resolved?
Best regards
3 Replies
- rajendraongole1Super User
Hi Berrcikk - Create a measure to sum the Sum column based on the extracted date part.
Try below measure :
TotalByDate =
VAR currentDate = MAX('Sales'[Date].[Date])
RETURN
CALCULATE(
SUM('Sales'[Sum]),
FILTER(
'Sales',
'Sales'[Date].[Date] = currentDate
)
)Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!- BerrcikkFrequent Visitor
Hi rajendraongole1 thanks for your response, however as I mentioned, I get the error that the column I'm referring to (with .[Date]), doesn't contain any date, alhotugh this column is set up to Date format.
- rajendraongole1Super User
Hi Berrcikk - sty is any language-specific abbreviation? is that a month?
if yes, we have to do in query editor with corresponding months for all 12 months and bring the date format with some other approach.
check it.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!