<?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: Card Visual showing Count of X filtered by average Y per X over a time period in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667720#M79396</link>
    <description>&lt;P&gt;Good day Abarett&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You should be able to create a measure that will calculate this&amp;nbsp;(instead of doing an expensive calculated column)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a new measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MeasureName =&lt;/P&gt;&lt;P&gt;VAR AvgSalesStore = 12345 (or any value you hardcode) or&amp;nbsp;VAR AvgSalesStore2 = AVERAGE('TableName'[Sales])&lt;BR /&gt;&lt;BR /&gt;VAR NumberOfStoresAboveAverage =&amp;nbsp;&lt;BR /&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;COUNTROWS('TableName'[Sales]), -- This is the main Fact Table&lt;/P&gt;&lt;P&gt;TableName'[Stores] &amp;gt;= AvgSalesStore&amp;nbsp; -- This will check the stores where the average is either&amp;nbsp;AvgSalesStore or&amp;nbsp;AvgSalesStore2&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;NumberOfStoresAboveAverage&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2022 15:43:18 GMT</pubDate>
    <dc:creator>jplouw1</dc:creator>
    <dc:date>2022-07-28T15:43:18Z</dc:date>
    <item>
      <title>Card Visual showing Count of X filtered by average Y per X over a time period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667658#M79389</link>
      <description>&lt;P&gt;Trying to Create 2 card visuals (one for this year and one for last year) that show the number of stores that are selling above an average N amount per month.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the best way to do this is to create a calculated column to sums the sales numbers by Store Name and Year. Can you let me know the best way to approach that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or if that is not the right appraoch, what might be? Pretty sure I am overcomplicated a potentially simple goal.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 15:06:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667658#M79389</guid>
      <dc:creator>abarrett</dc:creator>
      <dc:date>2022-07-28T15:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Card Visual showing Count of X filtered by average Y per X over a time period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667720#M79396</link>
      <description>&lt;P&gt;Good day Abarett&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;You should be able to create a measure that will calculate this&amp;nbsp;(instead of doing an expensive calculated column)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a new measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;MeasureName =&lt;/P&gt;&lt;P&gt;VAR AvgSalesStore = 12345 (or any value you hardcode) or&amp;nbsp;VAR AvgSalesStore2 = AVERAGE('TableName'[Sales])&lt;BR /&gt;&lt;BR /&gt;VAR NumberOfStoresAboveAverage =&amp;nbsp;&lt;BR /&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;COUNTROWS('TableName'[Sales]), -- This is the main Fact Table&lt;/P&gt;&lt;P&gt;TableName'[Stores] &amp;gt;= AvgSalesStore&amp;nbsp; -- This will check the stores where the average is either&amp;nbsp;AvgSalesStore or&amp;nbsp;AvgSalesStore2&lt;/P&gt;&lt;P&gt;RETURN&lt;/P&gt;&lt;P&gt;NumberOfStoresAboveAverage&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 15:43:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667720#M79396</guid>
      <dc:creator>jplouw1</dc:creator>
      <dc:date>2022-07-28T15:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Card Visual showing Count of X filtered by average Y per X over a time period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667745#M79400</link>
      <description>&lt;P&gt;So this is fantastic, and I think it gets me about 95% of the direction I am going.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;each line item in my version of TableName[Sales] may have more than 1 in it. That is fine, swaping COUNTROWS with SUM should work. Would any other parts of the measure need to be adjusted?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 16:10:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667745#M79400</guid>
      <dc:creator>abarrett</dc:creator>
      <dc:date>2022-07-28T16:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Card Visual showing Count of X filtered by average Y per X over a time period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667831#M79414</link>
      <description>&lt;P&gt;Please give sample data?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:07:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667831#M79414</guid>
      <dc:creator>jplouw1</dc:creator>
      <dc:date>2022-07-28T17:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Card Visual showing Count of X filtered by average Y per X over a time period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667863#M79420</link>
      <description>&lt;P&gt;Below are some overly simplied versions of the data where I am ultimately trying to find the number of stores (YTD, and prior year same time period) where the average monthly revenue is $50 for that same time period&lt;BR /&gt;&lt;BR /&gt;in the below example 2021 (through June) would have 2 stores (Store B and C)&lt;BR /&gt;2022 would also have 1, Store A&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Revenue Table&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;StoreRef&lt;/TD&gt;&lt;TD&gt;Revenue&lt;/TD&gt;&lt;TD&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;$500&lt;/TD&gt;&lt;TD&gt;1/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;$300&lt;/TD&gt;&lt;TD&gt;4/1/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;$1,000&lt;/TD&gt;&lt;TD&gt;1/2/2021&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;$100&lt;/TD&gt;&lt;TD&gt;1/5/2022&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;$500&lt;/TD&gt;&lt;TD&gt;3/3/2021&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;as well as a reference table where&lt;BR /&gt;0 -&amp;gt; Store A&lt;BR /&gt;1 -&amp;gt; Store B&lt;BR /&gt;2 -&amp;gt; Store C&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:26:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2667863#M79420</guid>
      <dc:creator>abarrett</dc:creator>
      <dc:date>2022-07-28T17:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Card Visual showing Count of X filtered by average Y per X over a time period</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2677349#M80047</link>
      <description>&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="411702" data-lia-user-login="abarrett" class="lia-mention lia-mention-user"&gt;abarrett&lt;/a&gt;,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Here is the calculated column formula to get the row count based on current category group and average:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Column = 
COUNTROWS (
    FILTER (
        SUMMARIZE (
            FILTER ( 'Table', [StoreRef] = EARLIER ( 'Table'[StoreRef] ) ),
            [StoreRef],
            [Date],
            [Revenue],
            "AVG",
                CALCULATE (
                    AVERAGE ( 'Table'[Revenue] ),
                    FILTER (
                        ALL ( 'Table' ),
                        [StoreRef] = EARLIER ( 'Table'[StoreRef] )
                            &amp;amp;&amp;amp; YEAR ( [Date] ) = YEAR ( EARLIER ( 'Table'[Date] ) )
                    )
                )
        ),
        [Revenue] &amp;gt; [AVG]
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;You can set two 'year' filters on your card to show different results.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="tahoma,arial,helvetica,sans-serif"&gt;Xiaoxin Sheng&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 06:22:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Card-Visual-showing-Count-of-X-filtered-by-average-Y-per-X-over/m-p/2677349#M80047</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-03T06:22:03Z</dc:date>
    </item>
  </channel>
</rss>

