Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I was able to create this pivot table with the desired values as columns, but the problem is with the values. I want to show DateTimes as values under these columns, but how can i do so?
The default script of autoCalendar is doing a Floor on the original date, so this is removing the time.
If you want to see it, use the original field linked to it [Date]:
Max([Date])
What is your expression? We can only see a portion of it.
It's
Max([Date.autoCalendar.YearsAgo])
YearsAgo returns the number of past years between your stored dates and today. So, this is excepted not to see a date.
You need to pick another field like autocalendar Date or basically the original date field of your datamodel (specially if you want also the time).
Max([Date.autoCalendar.Date])
Thank you, this indeed does show dates instead of numbers. The thing is, I was interested in knowing the DateTime, but I cannot seem to find an autoCalendar.DateTime, is there a workaround for this?
The default script of autoCalendar is doing a Floor on the original date, so this is removing the time.
If you want to see it, use the original field linked to it [Date]:
Max([Date])
Thank you @vincent_ardiet_ ,it seems this does show dates still, not datetimes.
EDIT: I was using the wrong field, this shows the datetime as you mentioned it would.
Pivoting a table on date times as values typically involves transforming a dataset where date-time values are stored in rows into a structure where those date times become column headers.
Keep in mind that if you have duplicate entries for the same date-time value, the pivot function won't work unless you first handle these duplicates. You may need to aggregate or transform the data accordingly before pivoting.
Is there a way to sort the pivot table by the datetimes? As I want to sort by the earliest to the latest datetime @vincent_ardiet_
Yes if you go in the "Sorting" section, you will see "Sort by first measure" (according to the fact that your max(Date) expression is still the first one).