<?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 Use harvested slicer in calculation in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2186069#M50981</link>
    <description>&lt;P&gt;I am using a box and whiskers graph to show some data but this data has a range of outliers so I want to be able to filter the graph by standard deviation as selected by the user.&lt;/P&gt;&lt;P&gt;I have created a table and off that table a slicer so the user can select between 1 and 20 standard deviations&lt;/P&gt;&lt;P&gt;Table: StandardDeviation&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Slicer:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In my KeyMeasures Table I have created a measure:&lt;/P&gt;&lt;P&gt;STDValue = SELECTEDVALUE( StandardDeviation[STD] , 0 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Standard Deviation - Calculated Column&lt;/P&gt;&lt;P&gt;STD-AtoB = STDEV.P(Visits[AtoB (Minutes)])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use the above STD-AtoB and multiply it by 4 std it works but if I try to pass the slicer value [STDValue] it returns 0&lt;/P&gt;&lt;P&gt;ScaledX4-AtoB =&lt;BR /&gt;VAR Mean = AVERAGE(Visits[AtoB (Minutes)])&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;Visits[AtoB (Minutes)] &amp;gt; Mean + Vists[STD-AtoB] * 4,&lt;BR /&gt;Mean +&amp;nbsp;Vists[STD-AtoB] * 4,&lt;BR /&gt;Visits[AtoB (Minutes)]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;with slicer value:&lt;/P&gt;&lt;P&gt;ScaledX4-AtoB =&lt;BR /&gt;VAR Mean = AVERAGE(Visits[AtoB (Minutes)])&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;Visits[AtoB (Minutes)] &amp;gt; Mean + Vists[STD-AtoB] * [STDValue],&lt;BR /&gt;Mean +&amp;nbsp;Vists[STD-AtoB] * [STDValue],&lt;BR /&gt;Visits[AtoB (Minutes)]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;I broke down the calculation to see if it would return the value and it returns 4 as selected in the slicer, so why won't it multiply in my above calculation?&lt;/P&gt;&lt;P&gt;ScaledX4-AtoB&lt;/P&gt;&lt;P&gt;Scaled-TriagetoDMC =&lt;BR /&gt;RETURN&lt;BR /&gt;[STDValue]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried moving the slicer value to the visits table and the key measures table, and taking it directly from the StandardDeviation table and even changing it to a calculated column in the Visits table&lt;/P&gt;&lt;P&gt;Using max/sum only gave me the max/sum of the (StandardDeviation[STD]) column.&lt;BR /&gt;There is too much sensitive data to post my analytic&lt;/P&gt;</description>
    <pubDate>Thu, 11 Nov 2021 21:36:19 GMT</pubDate>
    <dc:creator>MelForsyth</dc:creator>
    <dc:date>2021-11-11T21:36:19Z</dc:date>
    <item>
      <title>Use harvested slicer in calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2186069#M50981</link>
      <description>&lt;P&gt;I am using a box and whiskers graph to show some data but this data has a range of outliers so I want to be able to filter the graph by standard deviation as selected by the user.&lt;/P&gt;&lt;P&gt;I have created a table and off that table a slicer so the user can select between 1 and 20 standard deviations&lt;/P&gt;&lt;P&gt;Table: StandardDeviation&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Slicer:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;In my KeyMeasures Table I have created a measure:&lt;/P&gt;&lt;P&gt;STDValue = SELECTEDVALUE( StandardDeviation[STD] , 0 )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Standard Deviation - Calculated Column&lt;/P&gt;&lt;P&gt;STD-AtoB = STDEV.P(Visits[AtoB (Minutes)])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use the above STD-AtoB and multiply it by 4 std it works but if I try to pass the slicer value [STDValue] it returns 0&lt;/P&gt;&lt;P&gt;ScaledX4-AtoB =&lt;BR /&gt;VAR Mean = AVERAGE(Visits[AtoB (Minutes)])&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;Visits[AtoB (Minutes)] &amp;gt; Mean + Vists[STD-AtoB] * 4,&lt;BR /&gt;Mean +&amp;nbsp;Vists[STD-AtoB] * 4,&lt;BR /&gt;Visits[AtoB (Minutes)]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;with slicer value:&lt;/P&gt;&lt;P&gt;ScaledX4-AtoB =&lt;BR /&gt;VAR Mean = AVERAGE(Visits[AtoB (Minutes)])&lt;BR /&gt;RETURN&lt;BR /&gt;IF(&lt;BR /&gt;Visits[AtoB (Minutes)] &amp;gt; Mean + Vists[STD-AtoB] * [STDValue],&lt;BR /&gt;Mean +&amp;nbsp;Vists[STD-AtoB] * [STDValue],&lt;BR /&gt;Visits[AtoB (Minutes)]&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;I broke down the calculation to see if it would return the value and it returns 4 as selected in the slicer, so why won't it multiply in my above calculation?&lt;/P&gt;&lt;P&gt;ScaledX4-AtoB&lt;/P&gt;&lt;P&gt;Scaled-TriagetoDMC =&lt;BR /&gt;RETURN&lt;BR /&gt;[STDValue]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried moving the slicer value to the visits table and the key measures table, and taking it directly from the StandardDeviation table and even changing it to a calculated column in the Visits table&lt;/P&gt;&lt;P&gt;Using max/sum only gave me the max/sum of the (StandardDeviation[STD]) column.&lt;BR /&gt;There is too much sensitive data to post my analytic&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 21:36:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2186069#M50981</guid>
      <dc:creator>MelForsyth</dc:creator>
      <dc:date>2021-11-11T21:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Use harvested slicer in calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2186144#M50988</link>
      <description>&lt;P&gt;Are you trying to use [STDValue] in a calculated column? (Calculated columns cannot read slicers.)&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 23:12:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2186144#M50988</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-11-11T23:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: Use harvested slicer in calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2186255#M50995</link>
      <description>&lt;P&gt;Yes I am, which makes sense now.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I still do what I am trying to do in this as a measure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ScaledX4-AtoB =&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;VAR Mean = AVERAGE(Visits[AtoB (Minutes)])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IF(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Visits[AtoB (Minutes)] &amp;gt; Mean + Vists[STD-AtoB] * [STDValue],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mean +&amp;nbsp;Vists[STD-AtoB] * [STDValue],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Visits[AtoB (Minutes)]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 01:12:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2186255#M50995</guid>
      <dc:creator>MelForsyth</dc:creator>
      <dc:date>2021-11-12T01:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use harvested slicer in calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2187579#M51054</link>
      <description>&lt;P&gt;It should be possible as a measure but will need to be adjusted. I don't quite follow how it's supposed to work, so it's hard to suggest something specific but this might get you closer:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ScaledX4-AtoB =
VAR Mean = CALCULATE ( AVERAGE ( Visits[AtoB (Minutes)] ), ALLSELECTED () )
VAR CurrAB = AVERAGE ( Visits[AtoB (Minutes)] )
VAR SD = CALCULATE ( [STD-AtoB], ALLSELECTED () )
VAR SlicerSTD = [STDValue]
RETURN
    IF ( CurrAB &amp;gt; Mean + SD * SlicerSTD, Mean + SD * SlicerSTD, CurrAB )&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 12 Nov 2021 15:17:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2187579#M51054</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-11-12T15:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use harvested slicer in calculation</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2188979#M51132</link>
      <description>&lt;P&gt;Perfect, thank you&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Nov 2021 20:33:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Use-harvested-slicer-in-calculation/m-p/2188979#M51132</guid>
      <dc:creator>MelForsyth</dc:creator>
      <dc:date>2021-11-14T20:33:14Z</dc:date>
    </item>
  </channel>
</rss>

