<?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: Convert Excel formula to DAX in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/4286957#M170145</link>
    <description>&lt;P&gt;hi@Excelover&lt;/P&gt;&lt;P&gt;ry like:&lt;/P&gt;&lt;P&gt;column =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;SWITCH(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; TRUE(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ISBLANK([C2Column&lt;/SPAN&gt;&lt;SPAN&gt;]), 0,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;ISBLANK([A2Column]), 0,&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:51:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T08:51:19Z</dc:date>
    <item>
      <title>Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556325#M136886</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a new column in Power BI named PEN where each row in this column is a calculation based on values in three other columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The formula in Excel is as below, but I cannot figure out the equivalent in DAX to make this work, which I think might be because I am using a calculated column rather than an aggregated value.&lt;/P&gt;&lt;P&gt;=IF(ISBLANK(B2),IF(ISBLANK(C2),IF(ISBLANK(A2),0,1),0),0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Power BI table name is “Projects” and the Excel to Power BI column name equivalents are as below:&lt;/P&gt;&lt;P&gt;Column A – TLS&lt;/P&gt;&lt;P&gt;Column B – ULS&lt;/P&gt;&lt;P&gt;Column C - DCP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could anyone suggest what formula I would use in DAX to make this work?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 11:21:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556325#M136886</guid>
      <dc:creator>ExceLover</dc:creator>
      <dc:date>2023-11-28T11:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556400#M136897</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Certainly! In Power BI, you can create a calculated column using DAX with a formula similar to your Excel formula. The DAX equivalent would be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PEN =&lt;BR /&gt;IF (&lt;BR /&gt;ISBLANK ( Projects[TLS] ),&lt;BR /&gt;IF (&lt;BR /&gt;ISBLANK ( Projects[ULS] ),&lt;BR /&gt;IF ( ISBLANK ( Projects[DCP] ), 0, 1 ),&lt;BR /&gt;0&lt;BR /&gt;),&lt;BR /&gt;0&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This DAX formula checks if TLS is blank. If it is, it checks if ULS is blank. If ULS is also blank, it checks if DCP is blank. If DCP is blank, it returns 0; otherwise, it returns 1. If ULS is not blank, it returns 0. If TLS is not blank, it returns 0.&lt;/P&gt;&lt;P&gt;Make sure to replace "Projects" with your actual table name.&lt;/P&gt;&lt;P&gt;You can add this formula as a new calculated column in your "Projects" table in Power BI, and it should provide the same result as your Excel formula.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 12:05:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556400#M136897</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-28T12:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556458#M136908</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This doesn't work, it generates the error below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A single value for column 'DCP' in table 'Projects' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:02:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556458#M136908</guid>
      <dc:creator>ExceLover</dc:creator>
      <dc:date>2023-11-28T14:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556496#M136911</link>
      <description>&lt;P&gt;&lt;SPAN&gt;likely due to the fact that it's trying to compare columns directly, which can be problematic in certain contexts. Let's modify the formula to address this issue:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PEN =&lt;BR /&gt;IF (&lt;BR /&gt;ISBLANK ( 'Projects'[ULS] ) || ISBLANK ( 'Projects'[DCP] ) || ISBLANK ( 'Projects'[TLS] ),&lt;BR /&gt;0,&lt;BR /&gt;1&lt;BR /&gt;)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This revised formula checks if any of the columns 'ULS', 'DCP', or 'TLS' is blank. If any of them is blank, it returns 0; otherwise, it returns 1. This simplification should help avoid the error you encountered. Please replace 'Projects' with the actual name of your table.&lt;/P&gt;&lt;P&gt;If you continue to experience issues, it may be helpful to provide more details about your data model or any additional requirements you have for the calculation.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:09:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556496#M136911</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2023-11-28T13:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556524#M136916</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="652907" data-lia-user-login="ExceLover" class="lia-mention lia-mention-user"&gt;ExceLover&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;try like:&lt;/P&gt;
&lt;P&gt;column =&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;SWITCH(&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; TRUE(),&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ISBLANK([C2Column&lt;/SPAN&gt;&lt;SPAN&gt;]), 0,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;ISBLANK([A2Column]), 0,&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 1&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt; &lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 13:29:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556524#M136916</guid>
      <dc:creator>FreemanZ</dc:creator>
      <dc:date>2023-11-28T13:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556592#M136927</link>
      <description>&lt;P&gt;This still doesn't work, I receive the error below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A single value for column 'ULS' in table 'Projects' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:00:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556592#M136927</guid>
      <dc:creator>ExceLover</dc:creator>
      <dc:date>2023-11-28T14:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556836#M136954</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="460868" data-lia-user-login="FreemanZ" class="lia-mention lia-mention-user"&gt;FreemanZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the suggestion, this works as it should.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 16:08:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3556836#M136954</guid>
      <dc:creator>ExceLover</dc:creator>
      <dc:date>2023-11-28T16:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3559306#M137131</link>
      <description>&lt;P&gt;I have a different scenario now, I need 3 new columns that contain either 1 or 0 in the rows, based on the values in the rows in the columns DCP, ULS and TLS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pseudocode is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New column 1 =&lt;/P&gt;&lt;P&gt;If DCP is &amp;gt;=0 then value should be 0, otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ULS is &amp;gt;=0 then value should be 0, otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If TLS is &amp;gt;=0 then value should be 1, otherwise should be 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New column 2 =&lt;/P&gt;&lt;P&gt;If DCP is &amp;gt;=0 then value should be 0, otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ULS is &amp;gt;=0 then value should be 0, otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If TLS is &amp;gt;=0 then value should be 1, otherwise should be 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New column 3 =&lt;/P&gt;&lt;P&gt;If DCP is &amp;gt;=0 then value should be 1, otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If ULS is &amp;gt;=0 then value should be 0, otherwise;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If TLS is &amp;gt;=0 then value should be 0, otherwise should be 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please could you suggest the DAX formulae I should use for the 3 new columns?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 16:02:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/3559306#M137131</guid>
      <dc:creator>ExceLover</dc:creator>
      <dc:date>2023-11-29T16:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Excel formula to DAX</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/4286957#M170145</link>
      <description>&lt;P&gt;hi@Excelover&lt;/P&gt;&lt;P&gt;ry like:&lt;/P&gt;&lt;P&gt;column =&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;SWITCH(&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; TRUE(),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ISBLANK([C2Column&lt;/SPAN&gt;&lt;SPAN&gt;]), 0,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;ISBLANK([A2Column]), 0,&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; 1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:51:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Convert-Excel-formula-to-DAX/m-p/4286957#M170145</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:51:19Z</dc:date>
    </item>
  </channel>
</rss>

