<?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: Power BI Toggle for outstanding balance in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Toggle-for-outstanding-balance/m-p/3866729#M151057</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564261" data-lia-user-login="Sunila" class="lia-mention lia-mention-user"&gt;Sunila&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try the following Dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;OS_Bal_Yes = 
CALCULATE(
    [TotalBal],
    FILTER(
        ALL('CustTrans'),  // Consider using ALL to remove filters if necessary
        NOT(ISBLANK('CustTrans'[TotalBal])) &amp;amp;&amp;amp; 'CustTrans'[TotalBal] &amp;lt;&amp;gt; 0
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Selected Outstanding Balance =
SWITCH(
    SELECTEDVALUE('OutstandingBal'[Condition]),
    "No", [OS_Bal_No],
    "Yes", [OS_Bal_Yes]
)&lt;/LI-CODE&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2024 01:16:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-04-25T01:16:18Z</dc:date>
    <item>
      <title>Power BI Toggle for outstanding balance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Toggle-for-outstanding-balance/m-p/3866412#M151033</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently working on implementing a toggle or selection pane(as shown) that allows users to view customers with outstanding balances in a data table.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;When the user selects "Yes," the table should display customer rows where the amount is not zero or blank.&lt;/P&gt;&lt;P&gt;The default selection is "No," which shows balances either zero or blank.&lt;/P&gt;&lt;P&gt;To achieve this, I've created a SWITCH function:&lt;/P&gt;&lt;P&gt;Selected Outstanding Balance =&lt;BR /&gt;SWITCH(&lt;BR /&gt;SELECTEDVALUE('OutstandingBal'[Condition]),&lt;BR /&gt;"No", [OS_Bal_No],&lt;BR /&gt;"Yes", [OS_Bal_Yes])&lt;/P&gt;&lt;P&gt;where&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OS_Bal_Yes = CALCULATE( [TotalBal], &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FILTER( CustTrans, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;NOT(ISBLANK([TotalBal])) &amp;amp;&amp;amp; [TotalBal] &amp;lt;&amp;gt; 0 ) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, the OS_Bal_Yes measure is not filtering out rows with outstanding balances that are zero or blank as intended.&lt;/P&gt;&lt;P&gt;Could someone please assist me with resolving this issue?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 19:44:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Toggle-for-outstanding-balance/m-p/3866412#M151033</guid>
      <dc:creator>Sunila</dc:creator>
      <dc:date>2024-04-24T19:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Toggle for outstanding balance</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Toggle-for-outstanding-balance/m-p/3866729#M151057</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564261" data-lia-user-login="Sunila" class="lia-mention lia-mention-user"&gt;Sunila&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try the following Dax:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;OS_Bal_Yes = 
CALCULATE(
    [TotalBal],
    FILTER(
        ALL('CustTrans'),  // Consider using ALL to remove filters if necessary
        NOT(ISBLANK('CustTrans'[TotalBal])) &amp;amp;&amp;amp; 'CustTrans'[TotalBal] &amp;lt;&amp;gt; 0
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Selected Outstanding Balance =
SWITCH(
    SELECTEDVALUE('OutstandingBal'[Condition]),
    "No", [OS_Bal_No],
    "Yes", [OS_Bal_Yes]
)&lt;/LI-CODE&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Jayleny&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 01:16:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Power-BI-Toggle-for-outstanding-balance/m-p/3866729#M151057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-25T01:16:18Z</dc:date>
    </item>
  </channel>
</rss>

