<?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: Calculate average based on column values and selected value in slicers in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2623097#M76503</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , try measure like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Average OEE_1 = Switch(selectedvalue(Slicer[value), &lt;BR /&gt;"Product Type", AVERAGEX(VALUES(Deliver_O[ProductType]), CALCULATE('Measure'[Average O])),&lt;BR /&gt;"Location" , AVERAGEX(VALUES(Deliver_O[Location]), CALCULATE('Measure'[Average O])),&lt;BR /&gt;"Week", AVERAGEX(VALUES(Deliver_O[Week]), CALCULATE('Measure'[Average O])) &lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jul 2022 16:23:55 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-07-06T16:23:55Z</dc:date>
    <item>
      <title>Calculate average based on column values and selected value in slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2622694#M76464</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on calculating average for one of my dashboard, I want average to be calculated as selected value of slicer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let say I have one column of product type, another column of location and third is for week. I want my average to be calculated as selected value of this columns in slicer. If i am selecting product type the average will be based on that particular product type only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I am using below formula:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Average OEE_1 = &lt;/SPAN&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Deliver_O[ProductType]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Deliver_O[Location]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;AVERAGEX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;VALUES&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Deliver_O[Week]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Measure'&lt;/SPAN&gt;&lt;SPAN&gt;[Average O]&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;This formula helped me in getting average for product type selection, location selection but not in week selection.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 06 Jul 2022 13:38:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2622694#M76464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T13:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average based on column values and selected value in slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2623097#M76503</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , try measure like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Average OEE_1 = Switch(selectedvalue(Slicer[value), &lt;BR /&gt;"Product Type", AVERAGEX(VALUES(Deliver_O[ProductType]), CALCULATE('Measure'[Average O])),&lt;BR /&gt;"Location" , AVERAGEX(VALUES(Deliver_O[Location]), CALCULATE('Measure'[Average O])),&lt;BR /&gt;"Week", AVERAGEX(VALUES(Deliver_O[Week]), CALCULATE('Measure'[Average O])) &lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 16:23:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2623097#M76503</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-07-06T16:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average based on column values and selected value in slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2623131#M76506</link>
      <description>&lt;P&gt;Thanks Amit,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In first line "slicer" is greyed out for me, I am not sure if I am doing something wrong or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Those Product type, location in commas are to display something?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 16:48:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2623131#M76506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-06T16:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average based on column values and selected value in slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2634963#M77228</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;According to your description, I create a sample,&amp;nbsp;&lt;SPAN&gt;Average O is a measure.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;As you say, you want the measure dynamically change by the slicers of ProductType, Location and Week.&lt;/P&gt;
&lt;P&gt;However, as the measure created from Sales which is in the same table with the slicers, the measure can aotumatically change by the slicers without do anything.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;If this is not the problem, could you please explain it more through my sample. I attach it below for reference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Community Support Team _ kalyj&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;helps,&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;then please consider&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 03:03:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2634963#M77228</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-07-13T03:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average based on column values and selected value in slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2635336#M77240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;v-kalyj-msft,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching the screenshot of my sample data in excel, When I am using simple average dax formula, I am getting correct results for first two tables in screenshot but when i am selecting multiple location in slicer(washinton+London) the value is not matching.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have attached both screen shot for excel and for PBI also&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;img /&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 06:30:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2635336#M77240</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-07-13T06:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate average based on column values and selected value in slicers</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2635966#M77272</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;What's the formula of OEE measure? Why the average of (0.63264, 0.62643, 0.60761, 0.62469) is not 0.62167.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team _ kalyj&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2022 09:51:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-average-based-on-column-values-and-selected-value-in/m-p/2635966#M77272</guid>
      <dc:creator>v-yanjiang-msft</dc:creator>
      <dc:date>2022-07-13T09:51:22Z</dc:date>
    </item>
  </channel>
</rss>

