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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

First and last touch GA4 page url chart or entrance and exit report

Has anyone created a report in a chart or table which shows a users first and last touch by URLs or to put it another way shows what a site visitors first entrance page was and what the exit pages was. What is the best way to do this in Power Bi i would appreciate screen shots or a pbix file as an example

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. Data Preparation:
- Ensure that your dataset includes a user identifier, timestamps, page URLs, entrance indicators, and exit indicators.
- Import the relevant data into Power BI Desktop.

 

2. Data Modeling:
- Create a data model that includes all necessary tables and establish the right relationships between them.

 

3. Calculate First and Last Touch:
- Use DAX to calculate the first and last touch points. You'll need to identify the earliest and latest records for each user, based on timestamps.

Example DAX formulas might look like this:

FirstTouchURL = 
   CALCULATE(
       FIRSTNONBLANK('PageData'[URL], MIN('PageData'[Timestamp])),
       FILTER(
           ALL('PageData'),
           'PageData'[UserID] = EARLIER('PageData'[UserID]) &&
           'PageData'[EntranceIndicator] = TRUE
       )
   )
LastTouchURL = 
   CALCULATE(
       LASTNONBLANK('PageData'[URL], MAX('PageData'[Timestamp])),
       FILTER(
           ALL('PageData'),
           'PageData'[UserID] = EARLIER('PageData'[UserID]) &&
           'PageData'[ExitIndicator] = TRUE
       )
   )

- Replace `'PageData'`, `'URL'`, `'Timestamp'`, `'UserID'`, `'EntranceIndicator'`, and `'ExitIndicator'` with the actual names of your table and columns.

 

4. Create the Visualizations:
- Use a table visualization to display the UserID, FirstTouchURL, and LastTouchURL.
- Customize additional visuals as needed to better understand the user journey.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

Please try below steps:

1. Data Preparation:
- Ensure that your dataset includes a user identifier, timestamps, page URLs, entrance indicators, and exit indicators.
- Import the relevant data into Power BI Desktop.

 

2. Data Modeling:
- Create a data model that includes all necessary tables and establish the right relationships between them.

 

3. Calculate First and Last Touch:
- Use DAX to calculate the first and last touch points. You'll need to identify the earliest and latest records for each user, based on timestamps.

Example DAX formulas might look like this:

FirstTouchURL = 
   CALCULATE(
       FIRSTNONBLANK('PageData'[URL], MIN('PageData'[Timestamp])),
       FILTER(
           ALL('PageData'),
           'PageData'[UserID] = EARLIER('PageData'[UserID]) &&
           'PageData'[EntranceIndicator] = TRUE
       )
   )
LastTouchURL = 
   CALCULATE(
       LASTNONBLANK('PageData'[URL], MAX('PageData'[Timestamp])),
       FILTER(
           ALL('PageData'),
           'PageData'[UserID] = EARLIER('PageData'[UserID]) &&
           'PageData'[ExitIndicator] = TRUE
       )
   )

- Replace `'PageData'`, `'URL'`, `'Timestamp'`, `'UserID'`, `'EntranceIndicator'`, and `'ExitIndicator'` with the actual names of your table and columns.

 

4. Create the Visualizations:
- Use a table visualization to display the UserID, FirstTouchURL, and LastTouchURL.
- Customize additional visuals as needed to better understand the user journey.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

@Anonymous many thanks for your solution

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors