<?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 Statement for If Column Value = X, Return value that is column A * -1 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046495#M104733</link>
    <description>&lt;P&gt;Just chiming in to be careful with &lt;STRONG&gt;[ColB] = BLANK()&lt;/STRONG&gt; syntax since it returns true when [ColB] is zero.&amp;nbsp;I'd recommend using &lt;STRONG&gt;ISBLANK([ColB])&lt;/STRONG&gt; instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See here for more detail:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/blank-handling-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/blank-handling-in-dax/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 03:46:41 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2023-01-27T03:46:41Z</dc:date>
    <item>
      <title>Dax Statement for If Column Value = X, Return value that is column A * -1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046233#M104702</link>
      <description>&lt;P&gt;I am very new to DAX and Power BI. I want to create a new column that is a measure that would return the value of lets say column A if Column B is blank. If that Column B contains an X, then I would want it to return a value that would equal column A * -1. How would I write this in DAX. I tried to do a custom column with the if then but I wasn't getting anywhere. I am sure it needs to be a measure because I either want it to return the value of Column A, or I want it to return the value times -1 but it is all dependant on the value of a subsequent column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 22:42:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046233#M104702</guid>
      <dc:creator>smac812</dc:creator>
      <dc:date>2023-01-26T22:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Statement for If Column Value = X, Return value that is column A * -1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046321#M104709</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="505297" data-lia-user-login="smac812" class="lia-mention lia-mention-user"&gt;smac812&lt;/a&gt;&amp;nbsp;As a calculated column that should be something like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = IF([B] = BLANK(), [A], [A] * -1)&lt;/LI-CODE&gt;
&lt;P&gt;Sorry, having trouble following, can you post sample data as text and expected output?&lt;BR /&gt;Not really enough information to go on, please first check if your issue is a common issue listed here: &lt;A href="https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Also, please see this post regarding How to Get Your Question Answered Quickly: &lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The most important parts are:&lt;BR /&gt;1. Sample data as text, use the table tool in the editing bar&lt;BR /&gt;2. Expected output from sample data&lt;BR /&gt;3. Explanation in words of how to get from 1. to 2.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 23:36:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046321#M104709</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2023-01-26T23:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Statement for If Column Value = X, Return value that is column A * -1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046328#M104713</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="505297" data-lia-user-login="smac812" class="lia-mention lia-mention-user"&gt;smac812&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try to add a calculated column like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ColC = 
IF(
    [ColB] = BLANK(),
    [ColA],
    IF(
        CONTAINSSTRING([ColB], "X"),
        [ColA]*-1
))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;verifid and worked like:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2023 23:57:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046328#M104713</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-01-26T23:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dax Statement for If Column Value = X, Return value that is column A * -1</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046495#M104733</link>
      <description>&lt;P&gt;Just chiming in to be careful with &lt;STRONG&gt;[ColB] = BLANK()&lt;/STRONG&gt; syntax since it returns true when [ColB] is zero.&amp;nbsp;I'd recommend using &lt;STRONG&gt;ISBLANK([ColB])&lt;/STRONG&gt; instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See here for more detail:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.sqlbi.com/articles/blank-handling-in-dax/" target="_blank"&gt;https://www.sqlbi.com/articles/blank-handling-in-dax/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 03:46:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-Statement-for-If-Column-Value-X-Return-value-that-is-column/m-p/3046495#M104733</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2023-01-27T03:46:41Z</dc:date>
    </item>
  </channel>
</rss>

