<?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: column calculated in relation to another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293423#M122647</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529242" data-lia-user-login="UserSam123" class="lia-mention lia-mention-user"&gt;UserSam123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;What are the tables and what relationships are there between them?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jun 2023 14:03:58 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-06-20T14:03:58Z</dc:date>
    <item>
      <title>column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289516#M122417</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I'm coming to you because I need help with a formula.&lt;/P&gt;&lt;P&gt;For some time I've been trying to create a new column that would allow me to return the column&lt;/P&gt;&lt;P&gt;created below. calculated column with parametre&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The principle is that for the same id the 1 for example if in the stat column is present the status Accepted and cancelled or Cancelled and paid return 1 otherwise return.&lt;/P&gt;&lt;P&gt;I've tried using an Earlier, concatenateX, but it doesn't work at all. Do you think this is possible?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jun 2023 15:26:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289516#M122417</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-06-18T15:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289519#M122418</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529242" data-lia-user-login="UserSam123" class="lia-mention lia-mention-user"&gt;UserSam123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please try&lt;/P&gt;
&lt;P&gt;CalculatedColumn =&lt;BR /&gt;VAR CurrentIDTable =&lt;BR /&gt;CALCULATETABLE ( VALUES ( 'Table'[Stat] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) )&lt;BR /&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;"Cancelled" IN CurrentIDTable,&lt;BR /&gt;IF (&lt;BR /&gt;NOT ISEMPTY ( INTERSECT ( { "Accepted", "Paid" }, CurrentIDTable ) ),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;),&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jun 2023 15:43:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289519#M122418</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-18T15:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289657#M122429</link>
      <description>&lt;P&gt;Hello;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your feedback. I tested it on a pbix file and it works fine.&lt;/P&gt;&lt;P&gt;The aim is to do it from an azure analysis services cube. When I put in the code I get this error message: Failed to save changes on the server. Error returned:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"An unexpected error has occurred (file "xldc.cpp", line 3861, function "XLAggImpl_Set&amp;lt;11,1&amp;gt;: : Accumulate").&lt;/P&gt;&lt;P&gt;Microsoft.AnalysisServices.BackEnd.DataModelingSandboxTabular.ExecuteEngineCodeInBackground(OperationType type, Boolean cancellable, AMOCode code, Boolean raiseEvents)&lt;BR /&gt;à Microsoft.AnalysisServices.BackEnd.DataModelingSandboxTabular.DoExecuteEngineCode(OperationType type, OperationCancellability cancellable, AMOCode code, Boolean raiseEvents)&lt;BR /&gt;à Microsoft.AnalysisServices.BackEnd.DataModelingSandbox.ExecuteEngineCode(OperationType type, OperationCancellability cancellable, AMOCode code, Boolean raiseEvents)&lt;BR /&gt;à Microsoft.AnalysisServices.BackEnd.SandboxTransaction.CommitInternal(Boolean finalCommit)&lt;BR /&gt;----------------------------&lt;BR /&gt;à Microsoft.AnalysisServices.BackEnd.SandboxTransaction.CommitInternal(Boolean finalCommit)&lt;BR /&gt;à Microsoft.AnalysisServices.Common.SandboxEditor.ChangeFormula(TableWidgetPanel currentTable, IList`1 colIndices, IList`1 names, IList`1 expressions, Boolean doFormulaBarCommit, IList`1 displayIndices)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you like to know why?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Jun 2023 20:00:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289657#M122429</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-06-18T20:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289955#M122440</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529242" data-lia-user-login="UserSam123" class="lia-mention lia-mention-user"&gt;UserSam123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it's the IN operator. Please try&lt;/P&gt;
&lt;P&gt;CalculatedColumn =&lt;BR /&gt;VAR CurrentIDTable =&lt;BR /&gt;CALCULATETABLE ( VALUES ( 'Table'[Stat] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) )&lt;BR /&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;ISEMPTY ( EXCEPT ( { "Cancelled" }, CurrentIDTable ) ),&lt;BR /&gt;IF (&lt;BR /&gt;NOT ISEMPTY ( INTERSECT ( { "Accepted", "Paid" }, CurrentIDTable ) ),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;),&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 03:12:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3289955#M122440</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-19T03:12:48Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293229#M122630</link>
      <description>&lt;P&gt;Thank you very much, it's working fine now!&lt;BR /&gt;I have one last request, would it be possible to make it dynamic depending on the filter you apply?&lt;/P&gt;&lt;P&gt;Let's suppose that by filtering my report in id 1 there's only the paid status left, so the column should return 0 and not 1.&lt;/P&gt;&lt;P&gt;I imagine that you have to specify in the all function which ones you want to keep.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 12:42:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293229#M122630</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-06-20T12:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293261#M122633</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529242" data-lia-user-login="UserSam123" class="lia-mention lia-mention-user"&gt;UserSam123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You can use the same formula to create a measure. It should work if both [ID] and [Status] columns are placed in the same table visual along with the measure.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Measure =
VAR CurrentIDTable =
    CALCULATETABLE ( VALUES ( 'Table'[Stat] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) )
RETURN
    IF (
        ISEMPTY ( EXCEPT ( { "Cancelled" }, CurrentIDTable ) ),
        IF (
            NOT ISEMPTY ( INTERSECT ( { "Accepted", "Paid" }, CurrentIDTable ) ),
            1,
            0
        ),
        0
    )
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Jun 2023 12:53:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293261#M122633</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-20T12:53:03Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293273#M122635</link>
      <description>&lt;P&gt;The two columns are just in two different tables &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; Is this the only way?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 13:02:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293273#M122635</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-06-20T13:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293423#M122647</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529242" data-lia-user-login="UserSam123" class="lia-mention lia-mention-user"&gt;UserSam123&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;What are the tables and what relationships are there between them?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 14:03:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293423#M122647</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-20T14:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293474#M122651</link>
      <description>&lt;P&gt;It's in table 1 that I create the calculated column, which has to be dynamic. And it's in table 2 that I'm going to look for the id field&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;CurrentIDTable&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATETABLE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;GESTION&lt;/SPAN&gt;&lt;SPAN&gt;[Statut dossier]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;ALLEXCEPT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;GESTION&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;DOSSIER&lt;/SPAN&gt;&lt;SPAN&gt;[Identifiant dossier]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 14:25:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293474#M122651</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-06-20T14:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293542#M122654</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529242" data-lia-user-login="UserSam123" class="lia-mention lia-mention-user"&gt;UserSam123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Calculated columns cannot be dynamic as they do not interact with the filter context. This has to be a measure. Try it as a measure with&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN&gt;CurrentIDTable&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATETABLE&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;VALUES (&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;GESTION&lt;/SPAN&gt;&lt;SPAN&gt;[Statut dossier] ),&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;( ), VALUES (&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;DOSSIER&lt;/SPAN&gt;&lt;SPAN&gt;[Identifiant dossier] ) )&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 14:58:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3293542#M122654</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-20T14:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3295440#M122766</link>
      <description>&lt;P&gt;Thanks for your feedback;&lt;/P&gt;&lt;P&gt;The measurement itself works fine. But when I connect to the cube from power bi and display the measurement in a table, the lines are doubled.&lt;/P&gt;&lt;P&gt;In the first image it's the lines that I need to have and the second is the lines that are generated by placing the measurement in them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second table shows me all the rows without taking into account the filters I've placed in the filter pane.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 11:46:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3295440#M122766</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-06-21T11:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3301102#M123134</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know if this is possible or impossible?&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 14:30:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3301102#M123134</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-06-25T14:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3301145#M123136</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="529242" data-lia-user-login="UserSam123" class="lia-mention lia-mention-user"&gt;UserSam123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies, somehow I missed your reply on this. Please try&lt;/P&gt;
&lt;P&gt;Measur =&lt;BR /&gt;VAR CurrentIDTable =&lt;BR /&gt;CALCULATETABLE (&lt;BR /&gt;VALUES ( GESTION[Statut dossier] ),&lt;BR /&gt;ALLSELECTED (),&lt;BR /&gt;VALUES ( DOSSIER[Identifiant dossier] )&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF (&lt;BR /&gt;NOT ISEMPTY ( GESTION ) &amp;amp;&amp;amp; ISEMPTY ( EXCEPT ( { "Cancelled" }, CurrentIDTable ) ),&lt;BR /&gt;IF (&lt;BR /&gt;NOT ISEMPTY ( INTERSECT ( { "Accepted", "Paid" }, CurrentIDTable ) ),&lt;BR /&gt;1,&lt;BR /&gt;0&lt;BR /&gt;),&lt;BR /&gt;0&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 25 Jun 2023 16:33:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3301145#M123136</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-06-25T16:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3323674#M124448</link>
      <description>&lt;P&gt;Thanks !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 16:59:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3323674#M124448</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-07-10T16:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: column calculated in relation to another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3325551#M124524</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm coming back to you because I have a tiny inconsistency.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here we can see that I have two files. But neither of them has a paid/cancelled or accepted/cancelled status. So the StatusVar at the bottom should be null and not 1. Am I missing something in the measurement?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 14:50:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/column-calculated-in-relation-to-another-column/m-p/3325551#M124524</guid>
      <dc:creator>UserSam123</dc:creator>
      <dc:date>2023-07-11T14:50:54Z</dc:date>
    </item>
  </channel>
</rss>

