<?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 Conditional calculated column issue in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910098#M95092</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue where I need to create a new calculated column from the below data that will show when an item has been billed (i.e. Billed Amt is not blank) and collected. The problem I have is that the data in Collected Amt automatically shows a value when there is data in the Billed Amt column, whether that bill has been collected or not!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a problem because if a value shows in Billed Amt, and zero shows in Collected Amt, this could mean that either zero has been collected yet or that all of the bill has actually been written down or off (i.e. Written Off &amp;gt; 0).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to create a new calculated column which will only show the value if the Billed has actually been Collected? The logic should be the below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Billed and Collected YES = Billed Amt is not blank, Collected Amt &amp;gt; 0&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;- Billed and Collected YES = Billed Amt is not blank, Collected Amt = 0 but either WUWD Amt = Billed Amt, or Written Off &amp;gt; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help greatly apprecited!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&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>Wed, 16 Nov 2022 16:17:20 GMT</pubDate>
    <dc:creator>PNicholsonRS</dc:creator>
    <dc:date>2022-11-16T16:17:20Z</dc:date>
    <item>
      <title>Conditional calculated column issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910098#M95092</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue where I need to create a new calculated column from the below data that will show when an item has been billed (i.e. Billed Amt is not blank) and collected. The problem I have is that the data in Collected Amt automatically shows a value when there is data in the Billed Amt column, whether that bill has been collected or not!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a problem because if a value shows in Billed Amt, and zero shows in Collected Amt, this could mean that either zero has been collected yet or that all of the bill has actually been written down or off (i.e. Written Off &amp;gt; 0).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to create a new calculated column which will only show the value if the Billed has actually been Collected? The logic should be the below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Billed and Collected YES = Billed Amt is not blank, Collected Amt &amp;gt; 0&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;- Billed and Collected YES = Billed Amt is not blank, Collected Amt = 0 but either WUWD Amt = Billed Amt, or Written Off &amp;gt; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help greatly apprecited!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&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>Wed, 16 Nov 2022 16:17:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910098#M95092</guid>
      <dc:creator>PNicholsonRS</dc:creator>
      <dc:date>2022-11-16T16:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculated column issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910431#M95101</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226665" data-lia-user-login="PNicholsonRS" class="lia-mention lia-mention-user"&gt;PNicholsonRS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;YourColumn =
SWITCH (
    TRUE (),
    NOT ( ISBLANK ( Table[Billed Amt] ) ) &amp;amp;&amp;amp; Table[Collected Amt] = 0
        &amp;amp;&amp;amp; ( Table[WUWD Amt] = Table[Billed Amt] || Table[Written Off] &amp;gt; 0 ), "Yes",
    NOT ( ISBLANK ( Table[Billed Amt] ) ) &amp;amp;&amp;amp; Table[Collected Amt] &amp;gt; 0, "Yes",
    "No"
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 19:10:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910431#M95101</guid>
      <dc:creator>ERD</dc:creator>
      <dc:date>2022-11-16T19:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculated column issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910599#M95109</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="226665" data-lia-user-login="PNicholsonRS" class="lia-mention lia-mention-user"&gt;PNicholsonRS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a solution, you need a custom colum, there is a conditional colum but is limited to a fix parameters. So, once you click on custom colum you could insert the next formula or modify it as you wish.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used just the billed and collecet logic, without the WUWD but is the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The steps:&lt;/P&gt;&lt;P&gt;1.- Set your screen to the Data panel.&lt;/P&gt;&lt;P&gt;2.- Right click on the table that you are trying to add your column and then select "Edit Query" (Should be in the name of the table, not the fields, otherway you won't see the option "Edit Query")&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&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;3.- Once you are on the Power Query screen, clic on Add Column.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.- Then, enter the next formula:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Here is the formula in text:&lt;/P&gt;&lt;P class="lia-align-left lia-indent-padding-left-30px"&gt;if [Billed] &amp;gt; 0 and [Collected] &amp;gt; 0&lt;BR /&gt;then [Billed]&lt;BR /&gt;else "No billed/collected"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;5.- Finally, the results:&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;Hope this could solve your issue, if so don't hesitate to mark as solved if not please reply with your comments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 20:40:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910599#M95109</guid>
      <dc:creator>MorrisBI</dc:creator>
      <dc:date>2022-11-16T20:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional calculated column issue</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910618#M95111</link>
      <description>&lt;P&gt;I think this could work as well. With my data example just need to modify a little bit to include the double $0 escenario (Billed and Collected), but I guess this won't happen on the real life.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 20:48:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Conditional-calculated-column-issue/m-p/2910618#M95111</guid>
      <dc:creator>MorrisBI</dc:creator>
      <dc:date>2022-11-16T20:48:24Z</dc:date>
    </item>
  </channel>
</rss>

