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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
nckpedersen
Helper I
Helper I

nth Instance in Power Query to count pageviews by session

I am trying to extrapolite user site flow using a pageview report that has unique session id, visit date/time, url, and referrer url. 

 

I'd like to sort by chronological (ascending) on the date column, then duplicate the table, remove all columns but session id, remove duplicates, assign an index value. Then merge that table with original, sort by index value, then count instance of that index value. 

 

I need a formula like =countif(A$1:A1)

 

nckpedersen_0-1659724451517.png

 

3 REPLIES 3
OliT
Resolver I
Resolver I

Hi @nckpedersen 

>> I'd like to sort by chronological (ascending) on the date column, then duplicate the table, remove all columns but session id, remove duplicates, assign an index value. Then merge that table with original, sort by index value, then count instance of that index value. 

So where are you stuck now? What do you need us to help you with?  If possible, please share a sample process diagram and your sample data.

 

 

Regards,

OliT

Ashish_Mathur
Super User
Super User

Hi,

Imke's solution here will answer your question - Solved: Custom column Index or Ranking by other column.


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

Please provide sanitized sample data that fully covers your issue. I cannot help you without usable sample data.
Please paste the data into a table in your post or use one of the file services like OneDrive or Google Drive. I cannot use screenshots of your source data.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.