Table View with Group Aggregate "Date" with format MMM-YYYY?

Hello everyone,

I think I know the answer already (โ€œnot supportedโ€) but yet I want to ask.

This is somehow related to a previous question I had posted which was about how to format a Date column (see: Is it possible to display Date column values in a different format?)

At this point in my app, I have a table view that lists โ€œEXPENSESโ€, and each row has a [Date] column.

Iโ€™ve created also a [Month] virtual column of type โ€œTextโ€ with this formula: TEXT([Date],โ€œMMM-YYYYโ€) as it was the suggestion from the previous question (See link above). Also, this new virtual column is the โ€œLabelโ€ for my table. The values in that column look like: โ€œJan-2021โ€, โ€œFeb-2021โ€, โ€œMar-2021โ€ and so on.

Then, I wanted to Group Aggregate the EXPENSES by this virtual column, but the issue that I have is that the group gets sorted โ€œalphabeticallyโ€ and not โ€œchronologicallyโ€โ€ฆ (clearly, because the virtual column in the end is a โ€œTextโ€ and not a โ€œDateโ€).

Iโ€™ve tried changing the type of the [Month] virtual column to be of โ€œDateโ€ type, and while in this case the sorting is correctly (chronological), the Group Aggregate instead of showing something like โ€œJan-2021โ€ displays โ€œ1/1/2021โ€

So, my final objective would be to be able to have a Table with a Group Aggregate of type โ€œDateโ€ where the โ€œDateโ€ values in the Group Aggregate would be displayed in the โ€œMMM-YYYYโ€ format, while still keeping the โ€œchronologicalโ€ sorting.

Is it there any way to achieve this?

0 3 461
3 REPLIES 3

As per my understanding, it will not be possible. If you use date format, it will show like โ€œ1/1/2021โ€ and if you group by month names- Year , it will sort alphabetically.

If you are willing to take a look at a workaround, not so visually elegant, then there may be a way.

Yes, that is what I thoughโ€ฆ so, I ended up doing a โ€œhackโ€, like this:

CONCATENATE(
TEXT(
[_THISROW].[Date],โ€œyyyymmddโ€), // This is like a โ€œTimestampโ€
" (",
TEXT([_THISROW].[Month],โ€œMMM-YYYYโ€),
โ€œ)โ€
)

The end result looks like this:

20210401 (Apr-2021)

It is not the prettiest, but it does the job.

Very good. Thank you for the update.

Top Labels in this Space