The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello. I have a data set of web pages visited by a user. I'm analyzing how users get to the search page and where they go from there. There is no date involved, and all I have seen in tutorials is a date as the axis. Let's refer to them with these labels:
There is a sequence of events, obviously, a step 1-3. However my data set is just a list of page visits, along with a referring page. So a record in my data set for the Search Results page also has a referring page, which would be the Source page. The destination page might have a referrer of the Search Results page, might not (you can navigate to any page via the navigation or directly entering a URL for instance).
So the Search Results page will just be one item in the center column of the ribbon chart. There will be many pages flowing into that Search Results page (the source pages) and many flowing out of the Search Results page to a Destination page.
I think the problem I'm having is structuring the data. The X-axis, and using the referring URL to define the steps 1, 2, and 3. I really don't have any sample to share, I can't seem to even get started, but some sample records are below. Any help you can provide is greatly appreciated!
Visitor ID | Visit Page View Sequence | Referring Page Name | Page Name | (the x-axis value, which I need to derive) |
1 | 1 | (none - the user goes directly to mysite.com/contacts) | Contacts | Source Page |
1 | 2 | Contacts | Search Results | Search Results |
1 | 3 | Search Results | Contact Mike | Destination Page |
2 | 1 | (none - the user goes directly to mysite.com/products) | Products | Source Page |
2 | 2 | Products | Search Results | Search Results |
2 | 3 | Search Results | Widget #1 | Destination Page |
3 | 1 | Home page | News | Source Page |
3 | 2 | News | Search Results | Search Results |
3 | 3 | Search Results | News Article #1 | Destination Page |
Solved! Go to Solution.
Hi,@mateoc15
Thank you for your reply.
I apologize for not understanding your needs and providing the wrong answer.
Based on your latest description, I've created the following test, which hopefully meets your expectations
C_result =
SWITCH(TRUE(),
'case04'[Page Name]="Search Results","Search Results",
CONTAINSSTRINGEXACT('case04'[Referring Page Name],"Search Results"),"Destination Page",
"Source Page"
)
Please let me know if I give a response that does not meet your expectations.
Looking forward to your reply.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,@mateoc15
I am glad to help you.
According to your description, you want to create a new calculate column (the value is the type of the current user action: Source Page, Search Results, Destination Page) created on the basis of the user actions recognized in the table table.
Here are some of my suggestions, hopefully this will give you some ideas
For example, in the Referring Page Name column, if there is a website url, it will be recognized as a Source Page.
This requires the ability to recognize the website link in the Referring Page Name column, such as the keyword “.com”.
Here's a test I ran to see if it meets your expectations (defining the type of behavior by identifying the keyword in the Referring Page Name)
Here is my question for you to give a suitable answer
In fact the advice I gave above is very narrow, (only suitable for only a few kinds of website links) Is your real environment in the Referring Page Name column are some website links, is the full link for example https://app.powerbi.com Or is it part of the link e.g.
Mysite.com (without the Https prefix), which is where you give the test data
If you have a very large variety of URLs, I would recommend that you do the text field recognition in Power Query to create new columns, rather than using DAX code (if I understand your requirements correctly), as this is very inefficient.
Can you give me a more detailed test case, (without your real sensitive data), where you just need to provide the format of the recognized fields, by linking to some non-sensitive websites like https://app.powerbi.com。
If you can provide a pbix file that does not contain sensitive data, that would be helpful in resolving your issue!
Here are other resolved issues I found that may help you, hopefully it will help
URL:Solved: Column to URL in POwer Query - Microsoft Fabric Community
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for your reply! First, I don't have an issue specifically with URLs - https and such. The problem is that I want three items on the X axis - Source Page (many URLs), Search Page (there will only be ONE value like .com/search-results), and Destination Page (many URLs). The output will look something like...
I intend to do just a Top N URLs so there aren't hundreds of items on the left and right. I know that would be insane.
The data is structured in such a way that I only have the page name, and the page that referred the visitor to the page. The search results page can actually be either the page name, or can also be the destination page as well. Basic logic:
For the sake of simplicity I've just used page names instead of URLs, but the idea is the same.
The other post you shared didn't help unfortunately. It's unrelated to the ribbon specifically.
Does this help clarify?
Hi,@mateoc15
Thank you for your reply.
I apologize for not understanding your needs and providing the wrong answer.
Based on your latest description, I've created the following test, which hopefully meets your expectations
C_result =
SWITCH(TRUE(),
'case04'[Page Name]="Search Results","Search Results",
CONTAINSSTRINGEXACT('case04'[Referring Page Name],"Search Results"),"Destination Page",
"Source Page"
)
Please let me know if I give a response that does not meet your expectations.
Looking forward to your reply.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Carson Jian,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.