Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
Solved! Go to Solution.
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
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 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.
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.
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
Hi Janey, can you please elaborate on "Classify". I understand that classification is for data sensitivity and done in the Service?
The Example Display Result field I use is actually a measure: the Subject (English), the student test result (70) and IF not the current year a bracketed display of the year of the test.
I cannot find any options that make sense.
Hi, @lutho
If you use measure, you can’t see the feature of ‘sort by column’, you should use calculated column, right? Is there only one column in your table visual? Can you share your formula and whether the same value appears in the result column?
Best Regards
Janey Guo
Hi Janey - that confirms why the column was not available for selection.
The table visual has only 1 column - recent history of exam results.
The DAX query is fairly simple (I am still getting my head around the ins and outs of Power BI):
Hi, @lutho
If you use a measure, then you put only one measure in table visual,it will only display one value instead of a list of values.
Are SYN_AssessmentResults[Description],SYN_AssessmentResults[AssessmentResult] and SYN_AssessmentResults[Year] all measures?
Best Regards
Janey Guo
Hi Janey, the 3 fields used in the measure are all proper table columns. Given this scenario is the best approach for me to create a calculated column for the "Exam Display Result"?
Warm regards, Lex
Hi, @lutho
I think you are a little confused about the difference of measure and column. The measure changes with the context.
But no matter what, if you only want to put one column of values on table visual and sort by date, the measure can't be done, you should use column.
Best Regards
Janey Guo
Janey,
Thank you for everything.
All the best,
Lex
Hi Janes, I have run into an additional challenge. The method provided works as long as the data set I am trying to order/display does not contain duplicates. I even created a unique displaysortorder field across all exams. Unfortunately students sometimes get the same exam result - resulting in an error message that there are the same values for 2 different displaysortorder values. It seems illogical that PBI is enforcing this constraint. Thoughts?
@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
@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.
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.
Hi,
Could you share the link from where i can download your PBI file.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
87 | |
66 | |
51 | |
45 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |