The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have Kwywords and URL in Site Link May/Jun table
I have Unique Pages/Queries
I have page and keywords performace in Clicks, CTR and rank in DS Page And Query Table
Now I want to see URL which are appearing in sitelinks
Logic to determine URL are in site link
Step 1: Check the Keyword in Sitelink Jun/May table (if keywords is present in table then Yes otherwise Keywords did not have site link on SERP)
Step 2: Find out URL that are in sitelink and URL that is on main ranking. (Multiple URLs ranking on same position and URL with highest CTR out of those is main URL, URLs other than highest CTR URL are links appearing in sitelink for the query)
I want to create a Slicer Named With Sitelink or W/O sitelink
whcih should give me clicks number for a URL from sitelink (sitelink can be for many queries)
1. Create Calculated Column to Identify Keywords in Site Link Tables:
KeywordInSiteLink =
IF(
CONTAINS('Site Link Jun', 'Site Link Jun'[Keyword], 'DS Page And Query Wise'[Query]) ||
CONTAINS('Site Link May', 'Site Link May'[Keyword], 'DS Page And Query Wise'[Query]),
"Yes",
"No"
)
2. Create Measures to Determine Main URL and Site Link URLs:
Main URL Measure:
MainURL =
VAR SelectedURL = 'DS Page And Query Wise'[Landing Page]
VAR MaxCTR =
CALCULATE(
MAX('DS Page And Query Wise'[CTR]),
FILTER(
ALL('DS Page And Query Wise'),
'DS Page And Query Wise'[Query] = SELECTEDVALUE('DS Page And Query Wise'[Query])
)
)
RETURN
IF(
'DS Page And Query Wise'[CTR] = MaxCTR,
SelectedURL,
BLANK()
)
Site Link URLs Measure:
SiteLinkURLs =
VAR SelectedURL = 'DS Page And Query Wise'[Landing Page]
VAR MaxCTR =
CALCULATE(
MAX('DS Page And Query Wise'[CTR]),
FILTER(
ALL('DS Page And Query Wise'),
'DS Page And Query Wise'[Query] = SELECTEDVALUE('DS Page And Query Wise'[Query])
)
)
RETURN
IF(
'DS Page And Query Wise'[CTR] < MaxCTR,
SelectedURL,
BLANK()
)
3. Create a Slicer:
SitelinkFilter =
IF(
'DS Page And Query Wise'[KeywordInSiteLink] = "Yes",
"With Sitelink",
"Without Sitelink"ClicksFromSiteLinks =
CALCULATE(
SUM('DS Page And Query Wise'[Clicks]),
FILTER(
'DS Page And Query Wise',
'DS Page And Query Wise'[SitelinkFilter] = "With Sitelink"
)
)
)
4. Visualize Clicks for URLs from Site Links:
ClicksFromSiteLinks =
CALCULATE(
SUM('DS Page And Query Wise'[Clicks]),
FILTER(
'DS Page And Query Wise',
'DS Page And Query Wise'[SitelinkFilter] = "With Sitelink"
)
)
Use the provided DAX code to create the necessary calculated columns and measures in the appropriate tables. Add a slicer visual to your report and use the 'SiteLinkFilter' column for filtering.Use the 'ClickFromSiteLinks' measure to display clicks for URLs from site links in a card or table visual. Use other visuals as needed to display URLs, CTR, and other metrics based on the slicer selection.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
18 | |
18 | |
17 | |
15 | |
11 |
User | Count |
---|---|
35 | |
34 | |
19 | |
19 | |
14 |