<?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: Handling Multiple Date Relationships in Power BI with Client API Filters in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4622979#M59987</link>
    <description>&lt;P&gt;Option1 is not recommended .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/userelationship-in-calculated-columns/" target="_blank"&gt;https://www.sqlbi.com/articles/userelationship-in-calculated-columns/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Option 2 is also not great as you are duplicating data for not reason&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should create measures that use USERELATIONSHIP instead&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2025 20:22:27 GMT</pubDate>
    <dc:creator>Deku</dc:creator>
    <dc:date>2025-03-24T20:22:27Z</dc:date>
    <item>
      <title>Handling Multiple Date Relationships in Power BI with Client API Filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4622978#M59986</link>
      <description>&lt;P&gt;We have the following model setup:&lt;/P&gt;&lt;P&gt;A table&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;column1&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;column2&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;expiration date&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;effective date&lt;/P&gt;&lt;P&gt;DateTable&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Date (Relationship: DateTable[Date] is connected to A[effective date])&lt;/P&gt;&lt;P&gt;We’re using the Power BI Client API to apply global filters on DateTable[Date]. This works fine for most visuals that rely on A[effective date].&lt;/P&gt;&lt;P&gt;However, we have one visual that needs to be filtered based on A[expiration date] instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're considering two approaches and would appreciate your feedback:&lt;BR /&gt;&lt;STRONG&gt;Option 1&lt;/STRONG&gt;: Add calculated columns using USERELATIONSHIP&lt;BR /&gt;Enhance A table with new calculated columns:&lt;/P&gt;&lt;P&gt;DAX&lt;/P&gt;&lt;P&gt;column1_exp = CALCULATE([column1], USERELATIONSHIP(DateTable[Date], A[expiration date]))&lt;BR /&gt;column2_exp = CALCULATE([column2], USERELATIONSHIP(DateTable[Date], A[expiration date]))&lt;BR /&gt;This would allow us to build visuals based on these alternative measures using expiration dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Option 2&lt;/STRONG&gt;: Duplicate A table for visuals requiring expiration date Create a new B table (essentially a copy of A) and relate it to DateTable[Date] via expiration date. This lets us isolate visuals that rely on expiration date filtering.&lt;/P&gt;&lt;P&gt;A: related to DateTable[Date] via effective date&lt;/P&gt;&lt;P&gt;B: related to DateTable[Date] via expiration date&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 20:07:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4622978#M59986</guid>
      <dc:creator>edwardlee4948</dc:creator>
      <dc:date>2025-03-24T20:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Multiple Date Relationships in Power BI with Client API Filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4622979#M59987</link>
      <description>&lt;P&gt;Option1 is not recommended .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/userelationship-in-calculated-columns/" target="_blank"&gt;https://www.sqlbi.com/articles/userelationship-in-calculated-columns/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Option 2 is also not great as you are duplicating data for not reason&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should create measures that use USERELATIONSHIP instead&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 20:22:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4622979#M59987</guid>
      <dc:creator>Deku</dc:creator>
      <dc:date>2025-03-24T20:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Multiple Date Relationships in Power BI with Client API Filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4623552#M59995</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/761341"&gt;@edwardlee4948&lt;/a&gt;,&lt;BR /&gt;&lt;SPAN&gt;Thank you for bringing your query to the Microsoft Fabric Community Forum. I also want to thank&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1231947"&gt;@Deku&lt;/a&gt;&amp;nbsp;for their excellent response, which provides a solid foundation to address your scenario.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You’ve got a table A with effective date and expiration date, connected to DateTable[Date] via effective date, and you’re using Client API filters on DateTable[Date]. Most visuals work fine with effective date, but you need one visual to filter by expiration date. Let’s look at your options and the best path forward:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1231947"&gt;@Deku&lt;/a&gt;&amp;nbsp;is right to steer you away from this. As they noted with the SQLBI article, calculated columns are static they’re set during refresh and won’t dynamically reflect your Client API filters on DateTable[Date]. This wouldn’t meet your needs for that expiration date visual.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;Creating a second table B linked by expiration date could work, but as&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1231947"&gt;@Deku&lt;/a&gt;&amp;nbsp;pointed out, it duplicates data unnecessarily. This adds extra weight to your model and maintenance overhead, which isn’t ideal unless there’s a specific reason for it.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1231947"&gt;@Deku&lt;/a&gt;&amp;nbsp;suggestion using measures with USERELATIONSHIP is the best approach. This lets you stick with one A table and dynamically switch to the expiration date relationship for that specific visual, keeping your model efficient and flexible.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If you find this information useful, please “&lt;STRONG&gt;Accept it as a solution”&lt;/STRONG&gt; and give it a “&lt;STRONG&gt;Kudos&lt;/STRONG&gt;” to assist others in locating it easily.&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 07:01:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4623552#M59995</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-03-25T07:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Multiple Date Relationships in Power BI with Client API Filters</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4624357#M60010</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/1231947"&gt;@Deku&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/882998"&gt;@v-ssriganesh&lt;/a&gt;&amp;nbsp;Thank you for the answers!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2025 14:41:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Handling-Multiple-Date-Relationships-in-Power-BI-with-Client-API/m-p/4624357#M60010</guid>
      <dc:creator>edwardlee4948</dc:creator>
      <dc:date>2025-03-25T14:41:07Z</dc:date>
    </item>
  </channel>
</rss>

