Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
bigfun
Helper I
Helper I

Sum pages visited per session

Alright.... So I want to create a measure that will sum up the number of pages visited per session.


I want to sum the count of the URL column for each UnqSession, and have the ability to average it over time or industry (etc)

bigfun_0-1653510432669.png

 

I can lay it out in PBI Table and it looks like this, but I need measures so I can look at averages by month, etc..

bigfun_1-1653510998818.png

 

 



2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@bigfun ,

Count till Date avg above that

AverageX(Values(Table[Date]), Calculate(Distinctcount(Table[PageID])))

 

 

Count till Month avg above that

AverageX(Values(Table[Month Year]), Calculate(Distinctcount(Table[PageID])))

 

you can use count in place of Distinctcount

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, seperate the Date and time stamp in 2 columns from the Eventtime column.  Create a Calendar Table with calculated column formulas  for Year, Month name and Month number.  Sort the Month name by the Month number.  Create a relatinoship (Many to One and Single) between the Event Date column and Date column of the Calendar Table.  To your visual, drag Year and Month name from the Calendar Table.

Write this measure

Measure = counta(Data[URL])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
bigfun
Helper I
Helper I

Thank y'all so so much

Ashish_Mathur
Super User
Super User

Hi,

In the Query Editor, seperate the Date and time stamp in 2 columns from the Eventtime column.  Create a Calendar Table with calculated column formulas  for Year, Month name and Month number.  Sort the Month name by the Month number.  Create a relatinoship (Many to One and Single) between the Event Date column and Date column of the Calendar Table.  To your visual, drag Year and Month name from the Calendar Table.

Write this measure

Measure = counta(Data[URL])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@bigfun ,

Count till Date avg above that

AverageX(Values(Table[Date]), Calculate(Distinctcount(Table[PageID])))

 

 

Count till Month avg above that

AverageX(Values(Table[Month Year]), Calculate(Distinctcount(Table[PageID])))

 

you can use count in place of Distinctcount

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.