Forum Discussion
sort the date
Hi Anonymous,
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 ?????????
- v-piga-msft7 years agoResident Rockstar
Hi Anonymous,
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
- Anonymous7 years agoNot applicable
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 ) ) - Anonymous7 years agoNot applicable
hi v-piga-msft any idea??
- v-piga-msft7 years agoResident Rockstar
Hi Anonymous,
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