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
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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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