<?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: Dax formula to do a lookup/related in another table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284623#M21961</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;, thank you for your reply. I'm afraid it is not as simple as wrapping with an ABS function. For my expenses, I need to change positive values to negative values and negative values to positive values. To wrap it with an ABS function would throw my numbers out. For example, you can incur an expense when buying 100 boxes but then ask your supplier for a credit note for 20 of thos boxes. I really need to do as I say, multiple by (-1) for every ledger transactional line where [IncomeExpense]="Expense".&lt;/P&gt;&lt;P&gt;Also, I'm really keen to wrap my head around this little piece of dax, I'm hoping it will help in my undrestanding. Surely it cannot be that difficult? It's pretty simple in exel &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2020 14:06:10 GMT</pubDate>
    <dc:creator>michellepace</dc:creator>
    <dc:date>2020-08-10T14:06:10Z</dc:date>
    <item>
      <title>Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284549#M21953</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am at the beginning of my Dax learning curve and really struggling. I'm importing accounting transactional data where income is postive and expenses are negative. So far I have this formula which works fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Actuals = SUM( 'Account Transactions'[Amount] )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I'd like to represent my negtaive values as postive numbers in my matrix as well as graphs. If I write it in psudeo code, this is what it looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Actuals_ForMatrix&amp;amp;Graphs = 

var isExpense = if([IncomeExpense]="Expense", true, false) **need help here!

return if (isExpense, [Actuals] * -1, [Actuals])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone please help me write the dax I need?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:44:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284549#M21953</guid>
      <dc:creator>michellepace</dc:creator>
      <dc:date>2020-08-10T13:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284577#M21956</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="133502" data-lia-user-login="michellepace" class="lia-mention lia-mention-user"&gt;michellepace&lt;/a&gt;&amp;nbsp;- You should just be able to wrap your calculation with ABS function&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:50:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284577#M21956</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-10T13:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284601#M21957</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="133502" data-lia-user-login="michellepace" class="lia-mention lia-mention-user"&gt;michellepace&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; = ABS([Actuals])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 13:56:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284601#M21957</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-08-10T13:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284623#M21961</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;, thank you for your reply. I'm afraid it is not as simple as wrapping with an ABS function. For my expenses, I need to change positive values to negative values and negative values to positive values. To wrap it with an ABS function would throw my numbers out. For example, you can incur an expense when buying 100 boxes but then ask your supplier for a credit note for 20 of thos boxes. I really need to do as I say, multiple by (-1) for every ledger transactional line where [IncomeExpense]="Expense".&lt;/P&gt;&lt;P&gt;Also, I'm really keen to wrap my head around this little piece of dax, I'm hoping it will help in my undrestanding. Surely it cannot be that difficult? It's pretty simple in exel &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 14:06:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284623#M21961</guid>
      <dc:creator>michellepace</dc:creator>
      <dc:date>2020-08-10T14:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284929#M21971</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="133502" data-lia-user-login="michellepace" class="lia-mention lia-mention-user"&gt;michellepace&lt;/a&gt; , Try like ?&lt;/P&gt;
&lt;P&gt;if( [IncomeExpense]="Expense",-1*[Actuals] ,[Actuals] )&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 15:50:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284929#M21971</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-10T15:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284985#M21973</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;, please take a look at my original question. [IncomeExpense] is not a measure I have defined. That is the problem. I don't know how to look up a value. Please read my question and let me know your thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 16:19:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1284985#M21973</guid>
      <dc:creator>michellepace</dc:creator>
      <dc:date>2020-08-10T16:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1285056#M21975</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="133502" data-lia-user-login="michellepace" class="lia-mention lia-mention-user"&gt;michellepace&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Try this measure:&lt;BR /&gt;&lt;BR /&gt;You mentioned + into - and the other way is required in the comment but your measure tries to do the following leaving Income as it is.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Actuals_ForMatrix&amp;amp;Graphs = 

SUMX(
    'Account Transactions',

    IF(
        RELATED('Account Categories'[IncomeExpense]) = "Expense",
        [Actuals] * -1,
        [Actuals]
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? Mark this post as a solution, this will help others!.&lt;/P&gt;&lt;P&gt;Click on the Thumbs-Up icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 16:57:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1285056#M21975</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-08-10T16:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1285083#M21976</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="52518" data-lia-user-login="Fowmy" class="lia-mention lia-mention-user"&gt;Fowmy&lt;/a&gt;&amp;nbsp;!! It's so simple when you know how :). Thanks very much, exactly what I was looking for.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I figured out another way to achieve the same thing using PowerQuery editor. I merged the &lt;STRONG&gt;IncomeExpense&lt;/STRONG&gt; column from table&amp;nbsp;AccountCategories into the table AccountTransactions. Then I created a conditional column using:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;= Table.AddColumn(#"Expanded Account Categories", "Amount(+)", each if [Account Categories.IncomeExpense] = "Expense" then [Amount]*-1 else [Amount])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;My Last Question:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;In terms of performance, is there a preferable way and which is best? Using dax as you've shown, or doing it with Power Query (for example, is one better for performance than another)?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 17:17:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1285083#M21976</guid>
      <dc:creator>michellepace</dc:creator>
      <dc:date>2020-08-10T17:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to do a lookup/related in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1285113#M21977</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="133502" data-lia-user-login="michellepace" class="lia-mention lia-mention-user"&gt;michellepace&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Glad it worked for you!&lt;BR /&gt;&lt;BR /&gt;It is better to keep it with DAX it is more on the calculation side. When you do in PQ, it adds additional data load and it is static.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;________________________&lt;/P&gt;&lt;P&gt;Did I answer your question? &lt;STRONG&gt;Mark this post as a solution,&lt;/STRONG&gt; this will help others!.&lt;/P&gt;&lt;P&gt;Click on the &lt;STRONG&gt;Thumbs-Up&lt;/STRONG&gt; icon on the right if you like this reply &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;A href="https://www.youtube.com/channel/UCKwBEguA8IlBubIobaOormg?sub_confirmation=1" target="_blank"&gt;YouTube, &lt;/A&gt;&lt;A href="https://linkedin.com/in/fowmy" target="_blank"&gt;LinkedIn&lt;/A&gt;&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 17:24:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-formula-to-do-a-lookup-related-in-another-table/m-p/1285113#M21977</guid>
      <dc:creator>Fowmy</dc:creator>
      <dc:date>2020-08-10T17:24:46Z</dc:date>
    </item>
  </channel>
</rss>

