Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6170627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:04:16+00:00 2026-05-23T23:04:16+00:00

I have a timespan in a datawarehouse representing time spent by a user doing

  • 0

I have a timespan in a datawarehouse representing time spent by a user doing a task (not a time dimension, but a measure). In SQL I have this set as datetime. When this is pulled into SSAS it converts to a Date Type, and this is not usable in a cube measure aggregation. Do I need to convert the timespan into an integer (seconds), or is there a better way to do this?

EDIT:

I changed the data type in SQL to time(7) and it pulled into SSAS as a WChar, which is not summable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:04:17+00:00Added an answer on May 23, 2026 at 11:04 pm

    I solved this as so:

    • In SSIS I converted the timespan into elapsed seconds and stored it as an integer
    • in SSAS I treated this measure as a SUM called “Duration In Seconds Sum”, but hid it
    • in SSAS I made a calculation called “Time Spent Sum” with the following expression:

    iif([Measures].[Duration In Seconds Sum] = 0,
    null,
    Format(Int([Measures].[Duration In Seconds Sum]/86400), “0:”) +
    Format(
    TimeSerial(0, 0, [Measures].[Duration In Seconds Sum]
    – (Int([Measures].[Duration In Seconds Sum]/86400) * 86400)),”HH:mm:ss”
    )
    )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Timespan variable, which has time in local time zone but for
I have a class Similar to this public class Model { public TimeSpan Time1
I have something like this: barProgress.BeginAnimation(RangeBase.ValueProperty, new DoubleAnimation( barProgress.Value, dNextProgressValue, new Duration(TimeSpan.FromSeconds(dDuration))); Now, how
i have this code to take a time in the past and generate a
I have a method that calculates the time offset between the user's time and
I have used TimeSpan control in my windows app C# that allows the user
I have a timespan object that needs to hold only time, without date. I
I have user typed times that need parsing into DateTime or TimeSpan (the date
I using xaf and xpo for my app. I have TimeSpan field for time:
I want to format the Timespan to have format like this 49 hr 34

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.