Forum Discussion
Sort report by name then date
- 6 years ago
hi, MouserMike
First, you should know that Difference between custom column and calculated column, please refer to this post:
Second, from your formula we could know that this is a calculated column.
so you could add FORMAT Function in your formula to change the format to output.
New Sort = Assignments[ResourceName] & FORMAT ( Assignments[AssignmentStartDate].[Date], "yyyy/mm/dd" )
Result:
Best Regards,
lin
Can you try by creating a new column
Concat Name and Date in YYYYMMDD format and try using it as the sort column
I created this column:
Sort = Assignments[ResourceName]&Assignments[AssignmentStartDate].[Date]
It defaults to a date format of mm/dd/yyyy so it doesn't sort correctly. How do you specify a different format as part of the concatenation?
- amitchandak6 years agoSuper User
Instead of .date use .year and the same manner take month and date and append them. Also, check DateTime.ToText
- amitchandak6 years agoSuper User
If above did not help? let me know.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-lili6-msft6 years agoCommunity Support
hi, MouserMike
First, you should know that Difference between custom column and calculated column, please refer to this post:
Second, from your formula we could know that this is a calculated column.
so you could add FORMAT Function in your formula to change the format to output.
New Sort = Assignments[ResourceName] & FORMAT ( Assignments[AssignmentStartDate].[Date], "yyyy/mm/dd" )
Result:
Best Regards,
lin
- MouserMike6 years agoHelper I
I have the sorting working correctly using the calculated column in the visual:
New Sort = Assignments[ResourceName] & FORMAT ( Assignments[AssignmentStartDate].[Date], "yyyy/mm/dd" )
However, I really don't want this column to be visible in the visual; the individual columns are already there, and this calculated column looks rather weird since it's multiple columns concatenated together. I've looked for ways to sort a visual by a column that is not part of the visual, but the only "solution" I've found is to add this calculated column to the far right of the visual, then shrink the width so it's almost invisible. Is there another way to do this?