<?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: Calculated Tables Advice in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Tables-Advice/m-p/2214630#M52374</link>
    <description>&lt;P&gt;I'm pretty confident that there's a cleaner way but, working with what I see, I'd suggest exploring a solution along these lines:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Earlier Opening Opportunity Mon-Fri Count =
VAR Summary =
    FILTER (
        SUMMARIZECOLUMNS (
            DimShop[ShopKey],
            CurrentWeekTimes[Opening Time],
            DimTime[TimeSlot],
            TREATAS (
                { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" },
                DimDate[DayNameShort]
            ),
            "@NetSalesExVAT", CALCULATE ( SUM ( FactSalesDetail[Net Sales Ex VAT] ) )
        ),
        DimTime[TimeSlot] = CurrentWeekTimes[Opening Time]
    )
VAR Grouped =
    GROUPBY (
        Summary,
        DimShop[ShopKey],
        "@ShopSales", SUMX ( CURRENTGROUP (), [@NetSalesExVAT] )
    )
RETURN
    COUNTROWS ( FILTER ( Grouped, ( [@ShopSales] / 5 ) &amp;gt; 40 ) )&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 30 Nov 2021 18:00:10 GMT</pubDate>
    <dc:creator>AlexisOlson</dc:creator>
    <dc:date>2021-11-30T18:00:10Z</dc:date>
    <item>
      <title>Calculated Tables Advice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Tables-Advice/m-p/2214404#M52355</link>
      <description>&lt;LI-CODE lang="markup"&gt;Earlier Opening Opportunity Mon-Fri Summary Table = 
FILTER (
    SUMMARIZECOLUMNS (
        'Earlier Opening Opportunity Mon-Fri Detail Table'[ShopKey],
        "Net Sales Ex Vat", (SUM ( 'Earlier Opening Opportunity Mon-Fri Detail Table'[Net Sales Ex VAT] ))/5),
    [Net Sales Ex Vat] &amp;gt; 40)​&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Earlier Opening Opportunity Mon-Fri Detail Table = 
FILTER( 
    FILTER(
        SUMMARIZECOLUMNS (
            DimShop[ShopKey],
            DimDate[WeekOfYear],
            DimDate[DateKey],
            DimDate[DayNameShort],
            CurrentWeekTimes[Opening Time],
            DimTime[TimeSlot],
            "Net Sales Ex VAT", SUM ( FactSalesDetail[Net Sales Ex VAT] )),
        DimDate[DayNameShort] in {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday"}),
    DimTime[TimeSlot] = CurrentWeekTimes[Opening Time])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am creating a Calculated Table from my Main Fact Table (2nd Code Snippet) and then creating a second summary Calculated Table (1st code Snippet) in order to use the ShoKey in the first Table to get a unique count of records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone give me any pointers on a potentially easier way to do this, either one Calculated Table or perhaps a single measure to get the Count i require?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 16:05:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Tables-Advice/m-p/2214404#M52355</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-30T16:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Tables Advice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Tables-Advice/m-p/2214630#M52374</link>
      <description>&lt;P&gt;I'm pretty confident that there's a cleaner way but, working with what I see, I'd suggest exploring a solution along these lines:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Earlier Opening Opportunity Mon-Fri Count =
VAR Summary =
    FILTER (
        SUMMARIZECOLUMNS (
            DimShop[ShopKey],
            CurrentWeekTimes[Opening Time],
            DimTime[TimeSlot],
            TREATAS (
                { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" },
                DimDate[DayNameShort]
            ),
            "@NetSalesExVAT", CALCULATE ( SUM ( FactSalesDetail[Net Sales Ex VAT] ) )
        ),
        DimTime[TimeSlot] = CurrentWeekTimes[Opening Time]
    )
VAR Grouped =
    GROUPBY (
        Summary,
        DimShop[ShopKey],
        "@ShopSales", SUMX ( CURRENTGROUP (), [@NetSalesExVAT] )
    )
RETURN
    COUNTROWS ( FILTER ( Grouped, ( [@ShopSales] / 5 ) &amp;gt; 40 ) )&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Nov 2021 18:00:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Tables-Advice/m-p/2214630#M52374</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2021-11-30T18:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated Tables Advice</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Tables-Advice/m-p/2214999#M52396</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;BR /&gt;The questions you need to ask yourself is do you really need to do a Calculated table for your usecase?&lt;BR /&gt;The problem is we don't know what you want to do.&lt;BR /&gt;&lt;BR /&gt;90% of the time, you don't need to build a Calculated Table and 95% of the time, you don't even need to know the function SummarizeColumns / Summarize.&lt;BR /&gt;&lt;BR /&gt;- Explain to us the different tables of your model and the relationship&lt;/P&gt;&lt;P&gt;- Give us an example of the final output you want to have (maybe with an excel table)&lt;BR /&gt;&lt;BR /&gt;Then, we can discuss about the possibilities&lt;/P&gt;</description>
      <pubDate>Wed, 01 Dec 2021 00:32:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculated-Tables-Advice/m-p/2214999#M52396</guid>
      <dc:creator>m3tr01d</dc:creator>
      <dc:date>2021-12-01T00:32:51Z</dc:date>
    </item>
  </channel>
</rss>

