Forum Discussion
Table visual sort order based on date column not displayed
Ok, I am feeling a bit foolish - this should not be hard.
I have a Table where I need to show the most recent 10 student results. If there are not enough in the present year I wil show prior year with a (year). I have written a measure and it all works. The problem is I need to sort these results by descending date order starting with the most recent result but not show the actual AssesmentRecordDate column.
What am I missing?
Thanks in advance, Lex
Hi, lutho
It’s my pleasure to answer for you.
According to your description, I think you can use 'sort bu column' function in result column.
Like this:
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, lutho
I think you need to classify the name of the same exam, for example science71, science72, so that there will be no errors.
Best Regards
Janey Guo
16 Replies
- v-janeyg-msftCommunity Support
Hi, lutho
It’s my pleasure to answer for you.
According to your description, I think you can use 'sort bu column' function in result column.
Like this:
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- luthoHelper II
Hi Janey - brilliant - I knew there had to be an elegant solution. I took me a while to realise I had to select the results column and then do the sort by column and I have accepted this as the solution for others to leverage.
It did lead into the next minor challenge in that there are duplicate dates message where 2 exams were conducted on the same day. What would be the pro way to address this?
And THANK YOU for your time and effort and skill.
- luthoHelper II
Janey - my apologies - I am no longer able to accept the above solution as I replied. When you respond I will accept the solution before anything else.
- amitchandakSuper User
lutho , First of check the data type of assessment date, is it date or not. It should be date; if not correct.
In three dots you have option to sort asc and desc. Click on the column name can also change the order.
- luthoHelper II
Hi Amitchandrak, thanks for responding and perhaps I have confused the question by showing the AssessmentRecordDate in the image attached. My challenge is that what I actually need to show just the subject line aka:
but sorted in the descending AssessmentDateOrder - without showing the actual date.
- Ashish_MathurSuper User
Hi,
Could you share the link from where i can download your PBI file.
- amitchandakSuper User
lutho , if it is measure, you sort asc and desc from three dots.
If it is column , the create
Most Recent Excam result 1 =[Most Recent Excam result 1]
Most Recent Excam result Sort = Switch( True() ,
[Most Recent Excam result 1] = "Accouunting ... " , 1 , // Write complete name
//Add others
,10
)
The sort Most Recent Excam result 1 on Most Recent Excam result sort and use that in visual
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column