Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
how to sort the measure (AvgTurnAroundTimeForTask) ???
On the top right of the table object there are 3 dots.
Click on that one and there is an option to sort the data
as u said it will sort based on the decimal number only...I already sorted based on what u said..
Eg:after 8days next one will be 7hrs..
@Gokul Best to send us a sample of the workspace.
You mentioned decimal but i cant see it on the posted image
@themistoklis thanks for ur reply..AvgTurnAroundTimeForTask is a calculated measure which converts minutes to day hr mins ...i want to sort based on "day hr mins" Format..
Will be difficult to tell you what's going on if we cant see the objects on the workspace... mask any sensitive data
avgTurnaroundTime is an calculated measure..i want to sort avgTurnaroundTime in descending order such that it will be as 9 Days 23 hrs 59 mins and then next with 9 Days 22hrs 55mins..
Hi @Gokul,
Have you solved your problem with the suggestion from themistoklis?
If you have solved, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)
In addion, is your measure a text type, if it is, I'm afraid that we may not sort the measure directly in Power BI.
There are two workarounds you may have a try.
1. Change the measure to calculated column and use the feature Sort by columns. You could refer to this similar thread.
2. Split your measure with Day and time, we could sort time and whole number type in Power BI.
Best Regards,
Cherry
Hi @v-piga-msft how can we convert measure to calculated column ... and is it possible to use calculated column as value in matrix visual ?????????
Hi @Gokul,
Hi @v-piga-msft how can we convert measure to calculated column ... and is it possible to use calculated column as value in matrix visual ?????????
If it is convenient, could you please share your formula so that we could help further on it?
In addition, we could use calculated column in matrix visual.
Best Regards,
Cherry
hi @v-piga-msft
when I create a new calculated column as a copy of measure, I am getting only one same value for all records...
AvgTurnaroundTimeForPendingTask =
VAR dayNo =
INT ( AVERAGE ( 'Task Query'[task_pending_datediff_minutes] ) / 1440 )
VAR hourNo =
INT (
MOD ( ( AVERAGE ( 'Task Query'[task_pending_datediff_minutes] ) ), 1440 ) / 60
)
VAR minuteNO =
MOD (
MOD ( ( AVERAGE ( 'Task Query'[task_pending_datediff_minutes] ) ), 1440 ),
60
)
VAR days =
IF ( dayNo > 1, dayNO & " Days ", IF ( dayNo = 1, dayNO & " Day " ) )
VAR hrs =
IF (
hourNo,
FORMAT ( hourNo, "#0" ) & " Hrs ",
IF ( hourNo = 1, FORMAT ( hourNo, "#0" ) & " Hr " )
)
VAR mins =
IF (
minuteNO > 1,
FORMAT ( minuteNo, "#0" ) & " Mins",
IF ( minuteNO = 1, FORMAT ( minuteNo, "#0" ) & " Min", IF ( minuteNO = 0, "" ) )
)
RETURN
CONCATENATE ( days, CONCATENATE ( hrs, mins ) )
Hi @Gokul,
I'm afraid that should be caused by the context.
You could modify your fomula like below.
VAR dayNo = INT ( Calculate(AVERAGE ( 'Task Query'[task_pending_datediff_minutes],ALLEXCEPT('Task Query','Task Query'[Column name])) / 1440 )
Here is an example which may help you understand the difference.
If you still need help, please share some data sample and your desired output so that we can help further on it.
Best Regards,
Cherry
i have added other column (ie) average turnaround time in minutes ....and i turned off the word wrap in column headers and sorted according to that(average turnaround time in minutes) ....
I have replicated your data and it works ok on my workspace.
2 Steps to do:
1. Click on the three dots --> Sort by --> Select AVGTurnaroundTimeforTask
2. Then Click on the three dots and select Sort descending
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
90 | |
82 | |
57 | |
41 | |
39 |