<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamic Links In Tables Based On Subdomain in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Links-In-Tables-Based-On-Subdomain/m-p/225277#M7120</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/10074"&gt;@md&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;We are working on a Power BI Embedded implementation within an application.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a table in Power BI where each record on the table should link to a corresponding page within the application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We don’t have any problem creating a column with a static string and turning that into a link using concatenation, we have done this in testing and it works just fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;URL = CONCATENATE("http://example.com/Page?pageId=", table[pageId])&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;However, we have many subdomains that will each be displaying the table and each will need ensure that the link is being created to the page within the correct subdomain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, the issue is in dynamically adding the subdomain to that string such that it will link to the correct instance of the application&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the table is displayed on &lt;STRONG&gt;subdomain_ONE&lt;/STRONG&gt; of the application, the link should look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;http://subdomain_ONE.example.com/Page?pageId=table[pageId]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When the table is displayed on&lt;STRONG&gt; subdomain_TWO&lt;/STRONG&gt; of the application, the link should look like:&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;http://subdomain_TWO.example.com/Page?pageId=table[pageId]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems like we are looking for something like this:&lt;/P&gt;
&lt;PRE&gt;URL = CONCATENATE("http://", [subdomain], ".example.com/Page?pageId=", table[pageId])&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible for the host page to pass back which&amp;nbsp;subdomain it's in into the iframe? Is there another way to accomplish this?&amp;nbsp;We have N number of subdomains&amp;nbsp;for the application so we are looking for a way to build that string dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have looked at using JavaScript events to create links, but would prefer to have the link generation happen within Power BI, &lt;STRONG&gt;so any modifications to the reports&amp;nbsp;can be done by our BI developers and not our web developers.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that at this time the data source doesn’t know which &lt;SPAN&gt;subdomain&lt;/SPAN&gt; of the application it will be displayed in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any guidance or ideas would be appreciated!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/10074"&gt;@md&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I don't think Power BI could detect the "sub domains". Just imagine that the reports would be finnaly published to cloud, the "sub domains" in an intranet don't make sense. As a workaround, I think you may have to generate duplicated links for each "sub domains" in power bi report. &lt;STRONG&gt;When embedding, in your own application, ask the web developers to get the "sub domains" in the web app and apply filter to embedded reports.&lt;/STRONG&gt; This is a one-time work and no more work is required for the web developers. See a demo applying filter.&lt;/P&gt;
&lt;PRE&gt;// Read embed application token from Model
    var embededToken = "H4s xxxx xxx";

    // Read embed URL from Model
    var embedUrl = "https://msit.powerbi.com/reportEmbed?reportId=9da7ec4b-a5dd-4aaa-8056-9684a8084334&amp;amp;groupId=dc581184-a209-463b-8446-5432f16b6c15";

    // Read report Id from Model
    var embedReportId = "9da7ec4b-a5dd-4aaa-8056-9684a8084334";

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;
 
 
 //get the domains values in your web app
 var domains =["domain1"]
 var  domainFilter = {
        $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "yourTable", //table and column are case sensitive
    column: "DomainName"
  },
  operator: "In",
  values: domains
}
    var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        permissions: models.Permissions.All,
		filters:[domainFilter],
        settings: {
            filterPaneEnabled: true,
            navContentPaneEnabled: true
        }
    };

    // Get a reference to the embedded report HTML element
    var reportContainer = $('#reportContainer')[0];

    // Embed the report and display it within the div container.
    var report = powerbi.embed(reportContainer, config);&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Aug 2017 02:23:59 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-08-04T02:23:59Z</dc:date>
    <item>
      <title>Dynamic Links In Tables Based On Subdomain</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Links-In-Tables-Based-On-Subdomain/m-p/224132#M7081</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;We are working on a Power BI Embedded implementation within an application.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have a table in Power BI where each record on the table should link to a corresponding page within the application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We don’t have any problem creating a column with a static string and turning that into a link using concatenation, we have done this in testing and it works just fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;URL = CONCATENATE("http://example.com/Page?pageId=", table[pageId])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;However, we have many subdomains that will each be displaying the table and each will need ensure that the link is being created to the page within the correct subdomain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, the issue is in dynamically adding the subdomain to that string such that it will link to the correct instance of the application&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When the table is displayed on &lt;STRONG&gt;subdomain_ONE&lt;/STRONG&gt; of the application, the link should look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;http://subdomain_ONE.example.com/Page?pageId=table[pageId]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When the table is displayed on&lt;STRONG&gt; subdomain_TWO&lt;/STRONG&gt; of the application, the link should look like:&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;http://subdomain_TWO.example.com/Page?pageId=table[pageId]&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems like we are looking for something like this:&lt;/P&gt;&lt;PRE&gt;URL = CONCATENATE("http://", [subdomain], ".example.com/Page?pageId=", table[pageId])&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible for the host page to pass back which&amp;nbsp;subdomain it's in into the iframe? Is there another way to accomplish this?&amp;nbsp;We have N number of subdomains&amp;nbsp;for the application so we are looking for a way to build that string dynamically.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have looked at using JavaScript events to create links, but would prefer to have the link generation happen within Power BI, so any modifications to the reports&amp;nbsp;can be done by our BI developers and not our web developers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that at this time the data source doesn’t know which &lt;SPAN&gt;subdomain&lt;/SPAN&gt; of the application it will be displayed in.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any guidance or ideas would be appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 16:51:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Links-In-Tables-Based-On-Subdomain/m-p/224132#M7081</guid>
      <dc:creator>md</dc:creator>
      <dc:date>2017-08-02T16:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Links In Tables Based On Subdomain</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Links-In-Tables-Based-On-Subdomain/m-p/225277#M7120</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/10074"&gt;@md&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;We are working on a Power BI Embedded implementation within an application.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have a table in Power BI where each record on the table should link to a corresponding page within the application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We don’t have any problem creating a column with a static string and turning that into a link using concatenation, we have done this in testing and it works just fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;URL = CONCATENATE("http://example.com/Page?pageId=", table[pageId])&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;However, we have many subdomains that will each be displaying the table and each will need ensure that the link is being created to the page within the correct subdomain.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, the issue is in dynamically adding the subdomain to that string such that it will link to the correct instance of the application&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the table is displayed on &lt;STRONG&gt;subdomain_ONE&lt;/STRONG&gt; of the application, the link should look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;http://subdomain_ONE.example.com/Page?pageId=table[pageId]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;When the table is displayed on&lt;STRONG&gt; subdomain_TWO&lt;/STRONG&gt; of the application, the link should look like:&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;http://subdomain_TWO.example.com/Page?pageId=table[pageId]&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems like we are looking for something like this:&lt;/P&gt;
&lt;PRE&gt;URL = CONCATENATE("http://", [subdomain], ".example.com/Page?pageId=", table[pageId])&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible for the host page to pass back which&amp;nbsp;subdomain it's in into the iframe? Is there another way to accomplish this?&amp;nbsp;We have N number of subdomains&amp;nbsp;for the application so we are looking for a way to build that string dynamically.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We have looked at using JavaScript events to create links, but would prefer to have the link generation happen within Power BI, &lt;STRONG&gt;so any modifications to the reports&amp;nbsp;can be done by our BI developers and not our web developers.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that at this time the data source doesn’t know which &lt;SPAN&gt;subdomain&lt;/SPAN&gt; of the application it will be displayed in.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any guidance or ideas would be appreciated!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/10074"&gt;@md&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I don't think Power BI could detect the "sub domains". Just imagine that the reports would be finnaly published to cloud, the "sub domains" in an intranet don't make sense. As a workaround, I think you may have to generate duplicated links for each "sub domains" in power bi report. &lt;STRONG&gt;When embedding, in your own application, ask the web developers to get the "sub domains" in the web app and apply filter to embedded reports.&lt;/STRONG&gt; This is a one-time work and no more work is required for the web developers. See a demo applying filter.&lt;/P&gt;
&lt;PRE&gt;// Read embed application token from Model
    var embededToken = "H4s xxxx xxx";

    // Read embed URL from Model
    var embedUrl = "https://msit.powerbi.com/reportEmbed?reportId=9da7ec4b-a5dd-4aaa-8056-9684a8084334&amp;amp;groupId=dc581184-a209-463b-8446-5432f16b6c15";

    // Read report Id from Model
    var embedReportId = "9da7ec4b-a5dd-4aaa-8056-9684a8084334";

    // Get models. models contains enums that can be used.
    var models = window['powerbi-client'].models;
 
 
 //get the domains values in your web app
 var domains =["domain1"]
 var  domainFilter = {
        $schema: "http://powerbi.com/product/schema#basic",
  target: {
    table: "yourTable", //table and column are case sensitive
    column: "DomainName"
  },
  operator: "In",
  values: domains
}
    var config = {
        type: 'report',
        tokenType: models.TokenType.Embed,
        accessToken: accessToken,
        embedUrl: embedUrl,
        id: embedReportId,
        permissions: models.Permissions.All,
		filters:[domainFilter],
        settings: {
            filterPaneEnabled: true,
            navContentPaneEnabled: true
        }
    };

    // Get a reference to the embedded report HTML element
    var reportContainer = $('#reportContainer')[0];

    // Embed the report and display it within the div container.
    var report = powerbi.embed(reportContainer, config);&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2017 02:23:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Links-In-Tables-Based-On-Subdomain/m-p/225277#M7120</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-08-04T02:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Links In Tables Based On Subdomain</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Links-In-Tables-Based-On-Subdomain/m-p/255047#M7874</link>
      <description>&lt;P&gt;Our solution was to have the application write the subdomain to a table on the data source.&lt;/P&gt;&lt;P&gt;So our links are created by looking up that subdomain on the data source and building the URL for the link from there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 19:53:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Dynamic-Links-In-Tables-Based-On-Subdomain/m-p/255047#M7874</guid>
      <dc:creator>md</dc:creator>
      <dc:date>2017-09-19T19:53:05Z</dc:date>
    </item>
  </channel>
</rss>

