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?
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.
User | Count |
---|---|
16 | |
11 | |
9 | |
8 | |
4 |