Skip to content

Instantly share code, notes, and snippets.

@matt40k
Created November 30, 2016 21:50
Show Gist options
  • Save matt40k/b45d73245d88405c06722d65e1a0bdfe to your computer and use it in GitHub Desktop.
Save matt40k/b45d73245d88405c06722d65e1a0bdfe to your computer and use it in GitHub Desktop.
Pretty time - turns mins into hours and mins

IIF([Measures].[Time Spent (mins)] = NULL, NULL, IIF( [Measures].[Time Spent (mins)] < 60 ,CStr([Measures].[Time Spent (mins)]) + " mins" ,CStr(Int([Measures].[Time Spent (mins)]/60)) + " hours, " + CStr(([Measures].[Time Spent (mins)] - (Int([Measures].[Time Spent (mins)]/60)*60))) + " mins" ) )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment