<?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: using filter and divide in a meaure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/using-filter-and-divide-in-a-meaure/m-p/4007263#M156924</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518418" data-lia-user-login="Shega" class="lia-mention lia-mention-user"&gt;Shega&lt;/a&gt;&amp;nbsp;- The DAX below should work for you, with the exception of having to change the table/column names:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR gl = SUMX(fact_tbl, fact_tbl[gl] * 100)

VAR rc = CALCULATE( SUM(fact_tbl[rc]), KEEPFILTERS( fact_tbl[cust] ="X"))

RETURN
DIVIDE( gl, rc, 0 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works, please accept it as the solution.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2024 15:43:01 GMT</pubDate>
    <dc:creator>mark_endicott</dc:creator>
    <dc:date>2024-06-24T15:43:01Z</dc:date>
    <item>
      <title>using filter and divide in a meaure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/using-filter-and-divide-in-a-meaure/m-p/3090913#M156920</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just an info, I am new to PBI from a DBA background and working on converting a report that is written on OBIEE. Here is one problem I couldn't solve:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fact_tbl.gl * 100/filter(fact_tbl.rc USING (fact_tbl.cust='X'))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fact_tbl.gl is float datatype&lt;/P&gt;&lt;P&gt;fact_tbl.rc is float datatype&lt;/P&gt;&lt;P&gt;fact_tbl.cust is char datatype&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the PBI filter but the USING clause part is an issue that I couldn't come up with a good solution. When I tried as below, it is not giving me the correct result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Custx = divide(calculate(fact_tbl.gl]*100),calculate(fact_tbl[rc]),filter(fact_tbl, fact_tbl[cust] ="X"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 16:37:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/using-filter-and-divide-in-a-meaure/m-p/3090913#M156920</guid>
      <dc:creator>Shega</dc:creator>
      <dc:date>2023-02-21T16:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: using filter and divide in a meaure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/using-filter-and-divide-in-a-meaure/m-p/4007263#M156924</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518418" data-lia-user-login="Shega" class="lia-mention lia-mention-user"&gt;Shega&lt;/a&gt;&amp;nbsp;- The DAX below should work for you, with the exception of having to change the table/column names:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;VAR gl = SUMX(fact_tbl, fact_tbl[gl] * 100)

VAR rc = CALCULATE( SUM(fact_tbl[rc]), KEEPFILTERS( fact_tbl[cust] ="X"))

RETURN
DIVIDE( gl, rc, 0 )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this works, please accept it as the solution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2024 15:43:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/using-filter-and-divide-in-a-meaure/m-p/4007263#M156924</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-06-24T15:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: using filter and divide in a meaure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/using-filter-and-divide-in-a-meaure/m-p/4013156#M158054</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="518418" data-lia-user-login="Shega" class="lia-mention lia-mention-user"&gt;Shega&lt;/a&gt;&amp;nbsp;- Did this work?&amp;nbsp;&lt;SPAN&gt;Please could you mark it as the solution if yes, this helps other users find it.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 09:48:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/using-filter-and-divide-in-a-meaure/m-p/4013156#M158054</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-06-27T09:48:39Z</dc:date>
    </item>
  </channel>
</rss>

