<?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: Average Line for Line and Stack Chart in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3236785#M119002</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="335061" data-lia-user-login="ranis1227" class="lia-mention lia-mention-user"&gt;ranis1227&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It seems that there are 2 tables!&lt;/P&gt;
&lt;P&gt;Please change the measure. Put the 'table1(2)' date&amp;nbsp; into the slicer.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measureAverage =
VAR _1 =
    MAXX ( ALLSELECTED ( 'Table1 (2)' ), 'Table1 (2)'[Date Signed] )
VAR _2 =
    MINX ( ALLSELECTED ( 'Table1 (2)' ), 'Table1 (2)'[Date Signed] )
RETURN
    CALCULATE (
        AVERAGE ( 'Incidental Findings Note'[Incidental Findings Note Type Compliance] ),
        FILTER (
            ALL ( 'Incidental Findings Note' ),
            'Incidental Findings Note'[date] &amp;lt;= _1
                &amp;amp;&amp;amp; 'Incidental Findings Note'[date] &amp;gt;= _2
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;And make sure there is no relationship between the tables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 May 2023 02:48:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-16T02:48:43Z</dc:date>
    <item>
      <title>Average Line for Line and Stack Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3232691#M118679</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am on the latest release of Power Bi and it looks like the Average line is not available in the analytics windows of the visualization for Line and Stacked Column Chart.&amp;nbsp; Has this always been the case?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I tried creating an average line and could not figure it out in dax.&amp;nbsp; Here are my axis:&amp;nbsp;&lt;/P&gt;&lt;P&gt;X-axis = Date&lt;/P&gt;&lt;P&gt;Column y-axis = Volume of Patients&lt;/P&gt;&lt;P&gt;Line y-axis = Note type compliance (basically a sum of patients with a notetype/Volume of Patients)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create an average line for the note type compliance. So basically an average of a percentage.&amp;nbsp; I currently have it set as a constant at the moment. I need it to move with my date slicer. Any help will be greatly appreciated.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 12:20:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3232691#M118679</guid>
      <dc:creator>ranis1227</dc:creator>
      <dc:date>2023-05-12T12:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Average Line for Line and Stack Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3234787#M118852</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="335061" data-lia-user-login="ranis1227" class="lia-mention lia-mention-user"&gt;ranis1227&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;If so, you can create a measure.&lt;/P&gt;
&lt;P&gt;If it is a&amp;nbsp;single selection slicer, please have a try.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
VAR _1 =
    SELECTEDVALUE ( table[date] )
RETURN
    CALCULATE (
        AVERAGE ( table[value] ),
        FILTER ( ALL ( table ), table[date] &amp;gt;= _1 )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;If it is a date range slicer, please have a try.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measure =
VAR _1 =
    MAXX ( ALLSELECTED ( table ), table[date] )
VAR _2 =
    MINX ( ALLSELECTED ( table ), table[date] )
RETURN
    CALCULATE (
        AVERAGE ( table[value] ),
        FILTER ( ALL ( table ), table[date] &amp;lt;= _1 &amp;amp;&amp;amp; table[date] &amp;gt;= _2 )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 05:14:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3234787#M118852</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-15T05:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Average Line for Line and Stack Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3235657#M118926</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; thank you for the suggestion. However, I am still getting the same issue of&amp;nbsp;Column 'Incidental Findings Note Type Compliance' in table 'Incidental Findings Note' cannot be found or may not be used in this expression.&amp;nbsp; Here is the measure I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;measure Average = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_1&lt;/SPAN&gt;&lt;SPAN&gt; =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAXX&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;'Table1 (2)'&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'Table1 (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Date Signed]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;_2&lt;/SPAN&gt;&lt;SPAN&gt; =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;SPAN&gt;'Table1 (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Date Signed]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;_1&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;'Table1 (2)'&lt;/SPAN&gt;&lt;SPAN&gt;[Date Signed]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN&gt;_2&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The main issue is the incidental note type compliance is a percentage. Is this possible?&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 15 May 2023 12:29:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3235657#M118926</guid>
      <dc:creator>ranis1227</dc:creator>
      <dc:date>2023-05-15T12:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Average Line for Line and Stack Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3236785#M119002</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="335061" data-lia-user-login="ranis1227" class="lia-mention lia-mention-user"&gt;ranis1227&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;It seems that there are 2 tables!&lt;/P&gt;
&lt;P&gt;Please change the measure. Put the 'table1(2)' date&amp;nbsp; into the slicer.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;measureAverage =
VAR _1 =
    MAXX ( ALLSELECTED ( 'Table1 (2)' ), 'Table1 (2)'[Date Signed] )
VAR _2 =
    MINX ( ALLSELECTED ( 'Table1 (2)' ), 'Table1 (2)'[Date Signed] )
RETURN
    CALCULATE (
        AVERAGE ( 'Incidental Findings Note'[Incidental Findings Note Type Compliance] ),
        FILTER (
            ALL ( 'Incidental Findings Note' ),
            'Incidental Findings Note'[date] &amp;lt;= _1
                &amp;amp;&amp;amp; 'Incidental Findings Note'[date] &amp;gt;= _2
        )
    )
&lt;/LI-CODE&gt;
&lt;P&gt;And make sure there is no relationship between the tables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank" rel="noopener"&gt;How to Get Your Question Answered Quickly&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;BR /&gt;Community Support Team _ Rongtie&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 02:48:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3236785#M119002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-16T02:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Average Line for Line and Stack Chart</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3240386#M119203</link>
      <description>&lt;P&gt;So the issue is with Average function not able to pick up the measure of:&amp;nbsp;&lt;/P&gt;&lt;P&gt;AVERAGE ( 'Incidental Findings Note'[Incidental Findings Note Type Compliance] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the error:&amp;nbsp; The AVERAGE function only accepts a column reference as an argument.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The breakdown of the measures are as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Incidental Findings Note Type Compliance = [Sum of Discharge Patients w Note Type IF]/[Sum of Incidental Findings MRN]&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sum of Discharge Patients w Note Type IF = CALCULATE(COUNT('Distinct MRN for Incident Findings Note Type'[MRN]), 'Distinct MRN for Incident Findings Note Type'[Incidental Both] = 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sum of Incidental Findings MRN = DISTINCTCOUNT('Table1 (2)'[MRN])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried AVERAGEX to capture the measure and still could not get the correct average.&amp;nbsp; Let me know if that helps. I will try to provide a sample pbix file. The issue is private health information data in the file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 14:08:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Average-Line-for-Line-and-Stack-Chart/m-p/3240386#M119203</guid>
      <dc:creator>ranis1227</dc:creator>
      <dc:date>2023-05-17T14:08:13Z</dc:date>
    </item>
  </channel>
</rss>

