The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
Solved! Go to Solution.
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.
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 many thanks for your solution