Forum Discussion

bigfun's avatar
bigfun
Icon for Helper I rankHelper I
4 years ago
Solved

Calculate Total Session Time And Time Per Page

Alright so I am trying to tackle two things within the same table. (linked)  I was browsing other threads, and most had the start and stop times of a session or a page in separate columns, my data...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi bigfun ,

    I created a sample pbix file(see attachment) for you, please check whether that is what you want. You can create a measure as below for your first screenshot, please find the details in the attachment.

    Total_Session_Time = 
    VAR _tab =
        SUMMARIZE (
            'ui_PageActionView',
            'ui_PageActionView'[YYYYMMDD],
            'ui_PageActionView'[SessionID],
            "@duration",
                DATEDIFF (
                    MIN ( 'ui_PageActionView'[EventTime] ),
                    MAX ( 'ui_PageActionView'[EventTime] ),
                    MINUTE
                )
        )
    RETURN
        SUMX ( _tab, [@duration] )

    Regarding your second screenshot, I can't find the legend information in your provided excel data, could you please provide more information about the result you expect and the logic involved in the calculation. Thank you.

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards