Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
I am working on a Power BI report that contains a number links to other reports and files. I would like to record number of clicks of each link when user clicks, within this Power BI report.
I understand that this cannot be done in PowerBI, but perhaps it could be done with PowerApps visual?
Has anyone walked the path before? or have some showcases or example to share?
Solved! Go to Solution.
Hi, @MikeKKK
Having no experience with Power App, the following case seems to fit your needs.
Count the number of times clicked
Create a table like this called CountOfClicks
URL | TotalClicks |
www.google.ca | 23 |
www.arstechnica.com | 4 |
www.reddit.com | 34 |
Assuming the gallery holds the URL you could put this code in the OnSelect property of your button to track clicks
Set(currentRecord, LookUp(CountOfClicks, URL = ThisItem.Hyperlink));
If(
IsBlank(currentRecord),
//create a new record when URL is new and start at 1 click
Patch(CountOfClicks, Defaults(), {URL = ThisItem.Hyperlink, Clicks: 1}),
//add clicks to a record when URL already exists
Patch(CountOfClicks, currentRecord, {Clicks: currentRecord.Clicks + 1})
)
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I am having same problem. Have you been able to resolve it in power apps
Hi, @MikeKKK
Having no experience with Power App, the following case seems to fit your needs.
Count the number of times clicked
Create a table like this called CountOfClicks
URL | TotalClicks |
www.google.ca | 23 |
www.arstechnica.com | 4 |
www.reddit.com | 34 |
Assuming the gallery holds the URL you could put this code in the OnSelect property of your button to track clicks
Set(currentRecord, LookUp(CountOfClicks, URL = ThisItem.Hyperlink));
If(
IsBlank(currentRecord),
//create a new record when URL is new and start at 1 click
Patch(CountOfClicks, Defaults(), {URL = ThisItem.Hyperlink, Clicks: 1}),
//add clicks to a record when URL already exists
Patch(CountOfClicks, currentRecord, {Clicks: currentRecord.Clicks + 1})
)
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Have anyone manage to get this working? I'm trying to apply it to Power BI but I'm having trouble on where to use it. is it on a the Dax measure? or Power Query? im probably asking the wrong question but I would appreciate if there's any direction or an instruction break down on how to apply this on Power BI?
Thanks.
Hi, @MikeKKK
May I ask if the above post is helpful to you?
If it does, could you please mark the post which help as Answered? It means a lot to me, and it will help the others in the community find the solution easily if they face the same problem with you. Thank you.😀
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!