<?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: Relationship of balances with contracts in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747760#M84689</link>
    <description>&lt;P&gt;Hello. I ended up solving it by creating a table with the VALUES function only for contracts and making the relationship with fBalance, so dCalendar has no interference in the fBalance and fContracts tables&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2022 12:21:12 GMT</pubDate>
    <dc:creator>brunoecr</dc:creator>
    <dc:date>2022-09-05T12:21:12Z</dc:date>
    <item>
      <title>Relationship of balances with contracts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2739034#M84101</link>
      <description>&lt;P&gt;Guys, can you help me?&lt;/P&gt;&lt;P&gt;I have 3 tables: dCalendar / dContracts / fSaldos&lt;/P&gt;&lt;P&gt;Relationships created:&lt;BR /&gt;- dCalendar(date) → dContracts(Contract date) - Active&lt;BR /&gt;- dCalendar(date) → fSaldos(dateSaldo) - Inactive&lt;BR /&gt;- dContracts(CodUnico) → fBalances(CodUnico) - Active&lt;/P&gt;&lt;P&gt;** The second relationship is inactive because it already has an indirect relationship&lt;/P&gt;&lt;P&gt;I need to bring the balance of each contract that evolves each month, and the contract date is always stipulated on the first day of the month, as well as the Balance.&lt;/P&gt;&lt;P&gt;The measure I'm using to bring the balance is as follows:&lt;BR /&gt;Balance = CALCULATE(SUM(fSados[Balance]), USERELATIONSHIP(dCalendar[date], fBalances[dateBalance]))&lt;/P&gt;&lt;P&gt;However, it deactivates the initial relationship of Date of Contracts with dCalendar, thus trasando all the balances of each month for not having a relationship of dates, could someone tell me if I can keep the previous filter of dates before activating the relationship by measure with the USERELATIONSHIP ?&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 20:21:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2739034#M84101</guid>
      <dc:creator>brunoecr</dc:creator>
      <dc:date>2022-08-31T20:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Relationship of balances with contracts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2739135#M84111</link>
      <description>&lt;P&gt;No, you can't because at any one time there can't be 2 active relationships between 2 tables (that's why your measure automatically disables one of the relationships). But you can have 2 date tables, for instance, one for each type of date. You can also move filters from one table to another using TREATAS.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 21:23:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2739135#M84111</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-08-31T21:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: Relationship of balances with contracts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2743396#M84405</link>
      <description>&lt;P&gt;Thanks for the answer, but when I make two tables of dates and I try to use the TEATRAS function, it has the same effect as the relationship, because TEATRAS creates a virtual relationship.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 11:36:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2743396#M84405</guid>
      <dc:creator>brunoecr</dc:creator>
      <dc:date>2022-09-02T11:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Relationship of balances with contracts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747065#M84639</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="435476" data-lia-user-login="brunoecr" class="lia-mention lia-mention-user"&gt;brunoecr&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is no relationship between the two tables, use &lt;A href="https://docs.microsoft.com/en-us/dax/treatas-function" target="_blank" rel="noopener"&gt;Treatas&lt;/A&gt;&amp;nbsp; in measure to create a virtual relationship between the two tables to calculate the result .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there is an inactive relationship between the two tables, you can use &lt;A href="https://docs.microsoft.com/en-us/dax/userelationship-function-dax" target="_blank" rel="noopener"&gt;USERELATIONSHIP&lt;/A&gt;&amp;nbsp; in the formula to activate the inactive relationship to calculate the result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ Eason&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 07:31:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747065#M84639</guid>
      <dc:creator>v-easonf-msft</dc:creator>
      <dc:date>2022-09-05T07:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: Relationship of balances with contracts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747163#M84646</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="435476" data-lia-user-login="brunoecr" class="lia-mention lia-mention-user"&gt;brunoecr&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I would advise against having a relationship between a date dimension table (dCalendar) and an ordinary dimension table (dContracts).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you remove the relationship betweendCalendar and dContracts, couldn't you then keep the relationship between dCalendar and fBalances active, and apply filters directly on the contract date in the dContracts table?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 07:56:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747163#M84646</guid>
      <dc:creator>Adescrit</dc:creator>
      <dc:date>2022-09-05T07:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Relationship of balances with contracts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747168#M84647</link>
      <description>&lt;P&gt;Can you please take a screenshot of your model and show us? Maybe there's a better way to structure the model and get rid of inactive relationships?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 07:58:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747168#M84647</guid>
      <dc:creator>daXtreme</dc:creator>
      <dc:date>2022-09-05T07:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: Relationship of balances with contracts</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747760#M84689</link>
      <description>&lt;P&gt;Hello. I ended up solving it by creating a table with the VALUES function only for contracts and making the relationship with fBalance, so dCalendar has no interference in the fBalance and fContracts tables&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 12:21:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Relationship-of-balances-with-contracts/m-p/2747760#M84689</guid>
      <dc:creator>brunoecr</dc:creator>
      <dc:date>2022-09-05T12:21:12Z</dc:date>
    </item>
  </channel>
</rss>

