<?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 calculated weighted average  after applying filter on 4 different columns based on a value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-weighted-average-after-applying-filter-on-4-different/m-p/3103113#M156716</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calculated weighted average after applying filter on 4 different columns based on a value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample columns A, B,C,D,E,F. I have to do something as below :&lt;/P&gt;&lt;P&gt;I need to calculate product = A* B&lt;BR /&gt;Then I need to Sum(product) /sum (B)&lt;/P&gt;&lt;P&gt;and filter this based on some conditions&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;select &lt;STRONG&gt;sum(product)/sum(B)&lt;/STRONG&gt; from&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select DISTINCT&amp;nbsp; A&lt;/P&gt;&lt;P&gt;,B&lt;/P&gt;&lt;P&gt;,C&lt;/P&gt;&lt;P&gt;,E&lt;/P&gt;&lt;P&gt;,&lt;STRONG&gt;A*B &lt;/STRONG&gt;as&lt;STRONG&gt; product&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where C in ('value1','value 2')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and Month in ('APR-21')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and D in ('1')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and F in ('v1','v2','v3')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and E in ('value 1','value2')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;) weighted-average&lt;BR /&gt;&lt;BR /&gt;#calculate #filter #sum #average #weightedAverage #powerBI #DAX&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 08:14:30 GMT</pubDate>
    <dc:creator>Sania-F</dc:creator>
    <dc:date>2023-02-28T08:14:30Z</dc:date>
    <item>
      <title>calculated weighted average  after applying filter on 4 different columns based on a value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-weighted-average-after-applying-filter-on-4-different/m-p/3103113#M156716</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;calculated weighted average after applying filter on 4 different columns based on a value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample columns A, B,C,D,E,F. I have to do something as below :&lt;/P&gt;&lt;P&gt;I need to calculate product = A* B&lt;BR /&gt;Then I need to Sum(product) /sum (B)&lt;/P&gt;&lt;P&gt;and filter this based on some conditions&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;select &lt;STRONG&gt;sum(product)/sum(B)&lt;/STRONG&gt; from&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;select DISTINCT&amp;nbsp; A&lt;/P&gt;&lt;P&gt;,B&lt;/P&gt;&lt;P&gt;,C&lt;/P&gt;&lt;P&gt;,E&lt;/P&gt;&lt;P&gt;,&lt;STRONG&gt;A*B &lt;/STRONG&gt;as&lt;STRONG&gt; product&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;from&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;where C in ('value1','value 2')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and Month in ('APR-21')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and D in ('1')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and F in ('v1','v2','v3')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;and E in ('value 1','value2')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;) weighted-average&lt;BR /&gt;&lt;BR /&gt;#calculate #filter #sum #average #weightedAverage #powerBI #DAX&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 08:14:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculated-weighted-average-after-applying-filter-on-4-different/m-p/3103113#M156716</guid>
      <dc:creator>Sania-F</dc:creator>
      <dc:date>2023-02-28T08:14:30Z</dc:date>
    </item>
  </channel>
</rss>

