<?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: Need to populate CALCULATED table with dates and other values taken form the lookup table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2722576#M83084</link>
    <description>&lt;P&gt;You could add something like the below to the code which builds the calculated costs table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATETABLE (
    ADDCOLUMNS (
        SUMMARIZE ( 'CM', 'CM'[Date] ),
        "Placement ID", "Placement ID",
        "Cost-per-day",
            [Impressions] / 1000 * 4
    ),
    'CM'[Site] = "Programmatic"
)
&lt;/LI-CODE&gt;
&lt;P&gt;As for the date table, I would link that just to the calculated costs table, and have all calculations based on that.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2022 08:38:31 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2022-08-24T08:38:31Z</dc:date>
    <item>
      <title>Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2710026#M82283</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I’m new to this. Please bear with me. I previously worked on data architecting on the Qlik Sense BI platform using their scripting language.&amp;nbsp; We are now trying to build the same data model in Power BI.&amp;nbsp; I understand the two tools work differently.&lt;/P&gt;&lt;P&gt;I already have much of the model built.&amp;nbsp; I work with advertising data.&amp;nbsp; My PBIX file, can be accessed via WeTransfer:&lt;/P&gt;&lt;P&gt;&lt;A href="https://we.tl/t-QyHCoWbYKZ" target="_blank"&gt;https://we.tl/t-QyHCoWbYKZ&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;If you look at my Calculated costs table, you'll see I am taking costs from the following tables: Facebook, LinkedIn, and SA360clicks table.&amp;nbsp; Each of the rows on these tables have a date and a unique ID.&amp;nbsp; It is these unique ID's that will allow me to form relationships between all my tables, although I haven't yet formed all the necessary relationships.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also need to take costs from the &lt;STRONG&gt;build sheet table&lt;/STRONG&gt; and insert this into the calculated costs table, but the problem is the build sheet table does not have a date on each of its rows.&amp;nbsp; There are, however, &lt;STRONG&gt;Start Date&lt;/STRONG&gt;s and &lt;STRONG&gt;End Date&lt;/STRONG&gt;s on each of its rows.&amp;nbsp; The build sheet table is my lookup table currently, and it groups each advert on a row, and the start date and end date tells us when each advert begins and ends.&amp;nbsp; If you scroll to the right, you should see a unique ID (&lt;STRONG&gt;placement ID&lt;/STRONG&gt;) and a &lt;STRONG&gt;cost-per-day&lt;/STRONG&gt; (although not all rows have a cost, that’s fine).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is: how can I get these build sheet table costs into the Calculated Costs table I made?&amp;nbsp; I'm thinking this:&amp;nbsp; write a DAX formula to tell PBI to create (in the calculated costs table) a separate row for each day an advert is active.&amp;nbsp; Create date, placement ID, and cost-per-day in the calculated costs table. Take this data from the build sheet table.&amp;nbsp; How do we create separate dates in the calculated costs table when we only have a [start date] and [end date] in the build sheet?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is this even the best approach? I expect my data sets to grow over time.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help a new user &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 13:33:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2710026#M82283</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-18T13:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2710161#M82291</link>
      <description>&lt;P&gt;You can use&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calculated Costs-per-day table =
UNION (
    SUMMARIZE (
        'Facebook',
        'Facebook'[Date],
        'Facebook'[Placement ID],
        'Facebook'[Cost-per-day]
    ),
    SUMMARIZE (
        'Linkedin',
        'Linkedin'[Date],
        'Linkedin'[Placement ID],
        'Linkedin'[Cost-per-day]
    ),
    SUMMARIZE (
        'SA360CLICKS',
        'SA360CLICKS'[Date],
        'SA360CLICKS'[Placement ID],
        'SA360CLICKS'[Cost-per-day]
    ),
    SELECTCOLUMNS (
        GENERATE (
            SELECTCOLUMNS (
                'Build Sheet',
                "Start Date", 'Build Sheet'[Start Date],
                "End Date", 'Build Sheet'[End Date],
                "Placement ID", 'Build Sheet'[Placement ID],
                "Cost-per-day", 'Build Sheet'[Cost-per-day]
            ),
            CALENDAR ( [Start Date], [End Date] )
        ),
        "Date", [Date],
        "Placement ID", [Placement ID],
        "Cost-per-day", [Cost-per-day]
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Aug 2022 14:29:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2710161#M82291</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-18T14:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2710713#M82319</link>
      <description>&lt;P&gt;thank-you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Your suggestion gave me what I needed &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I see my chosen way of doing things has created a calculated costs table with over 105,000 rows of data.&amp;nbsp; Put that into context, this is just one month's worth of advertising data.&amp;nbsp; &amp;nbsp;That's way too much.&amp;nbsp; Is there anything you'd suggest, looking at my model, that I could do differently?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to expand on the DAX&amp;nbsp;code we’ve worked on together.&lt;/P&gt;&lt;P&gt;Is there a way to tell PBI to only take rows from the Build Sheet table that have a value &amp;gt; zero in the cost-per-day column (column AM).&amp;nbsp; In other words, if the Build Sheet cost-per-day is zero or if there’s no value in that cell at all, please do not take this row for the Calculated Costs table.&lt;/P&gt;&lt;P&gt;This should eliminate many of the redundant rows in my Calculated Costs table.&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 19:03:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2710713#M82319</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-18T19:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2711907#M82420</link>
      <description>&lt;P&gt;You can get only the rows which have a cost &amp;gt; 0 with&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calculated Costs-per-day table =
UNION (
    SUMMARIZE (
        'Facebook',
        'Facebook'[Date],
        'Facebook'[Placement ID],
        'Facebook'[Cost-per-day]
    ),
    SUMMARIZE (
        'Linkedin',
        'Linkedin'[Date],
        'Linkedin'[Placement ID],
        'Linkedin'[Cost-per-day]
    ),
    SUMMARIZE (
        'SA360CLICKS',
        'SA360CLICKS'[Date],
        'SA360CLICKS'[Placement ID],
        'SA360CLICKS'[Cost-per-day]
    ),
    SELECTCOLUMNS (
        GENERATE (
            SELECTCOLUMNS (
                FILTER ( 'Build Sheet', 'Build Sheet'[Cost-per-day] &amp;gt; 0 ),
                "Start Date", 'Build Sheet'[Start Date],
                "End Date", 'Build Sheet'[End Date],
                "Placement ID", 'Build Sheet'[Placement ID],
                "Cost-per-day", 'Build Sheet'[Cost-per-day]
            ),
            CALENDAR ( [Start Date], [End Date] )
        ),
        "Date", [Date],
        "Placement ID", [Placement ID],
        "Cost-per-day", [Cost-per-day]
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;I wouldn't worry too much about the number of rows, Power BI can comfortably cope with hundreds of millions, even billions, of rows.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Aug 2022 08:43:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2711907#M82420</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-19T08:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2716427#M82698</link>
      <description>&lt;P&gt;thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;I will try this later today &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2022 09:44:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2716427#M82698</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-22T09:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2721268#M83001</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;your DAX expressions worked wonderfully, thank-you&lt;BR /&gt;&lt;BR /&gt;I just have one final component to add to my calculated costs table. Please, feel free to take a look at how my data model looks currently: &lt;A href="https://we.tl/t-PXzOGPXHVn" target="_blank"&gt;https://we.tl/t-PXzOGPXHVn&lt;/A&gt;&lt;BR /&gt;You'll see we've integrated costs from the various tables into the separate calculated costs table. There's just one missing component, the programmatic media. Its costs aren't in any of the tables. What I did in my last data model on the Qlik Sense BI platform looked something like this:&lt;BR /&gt;&lt;BR /&gt;CONCATENATE(CostValue)&lt;BR /&gt;LOAD&lt;BR /&gt;Text("Placement ID") as "Placement ID",&lt;BR /&gt;// "Date",&lt;BR /&gt;Date(Date#("Date",'YYYY-MM-DD'),'DD/MM/YYYY') as Date,&lt;BR /&gt;(Sum(Impressions)/1000) * 4.00 as [Cost-Per-Day]&lt;BR /&gt;FROM [lib://Output Files/BBB/CMtable/*_CampaignManager*.qvd] (qvd)&lt;BR /&gt;WHERE [Site (DCM)] = 'Programmatic Media'&lt;BR /&gt;GROUP BY Date, "Placement ID";&lt;BR /&gt;&lt;BR /&gt;Where media is "Programmatic", we take the metric, [Impressions], from the CM table, divide that by 1,000, then multiple the result by 4.00 (answer in currency format); that's how we get costs [cost-per-day] for this particular media.&lt;BR /&gt;&lt;BR /&gt;How would we integrate this into my PBI calculated costs table?&lt;BR /&gt;&lt;BR /&gt;Lastly, if you look at my separate Date table, how would you form relationships with the other tables? Initially, I thought it would make sense to link the Date table with my lookup table, the Build Sheet table, but the Build Sheet table doesn't have a date on each row. Every other table, however, in my model does have a date on each of its rows.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thank-you&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 18:31:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2721268#M83001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-23T18:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2722576#M83084</link>
      <description>&lt;P&gt;You could add something like the below to the code which builds the calculated costs table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATETABLE (
    ADDCOLUMNS (
        SUMMARIZE ( 'CM', 'CM'[Date] ),
        "Placement ID", "Placement ID",
        "Cost-per-day",
            [Impressions] / 1000 * 4
    ),
    'CM'[Site] = "Programmatic"
)
&lt;/LI-CODE&gt;
&lt;P&gt;As for the date table, I would link that just to the calculated costs table, and have all calculations based on that.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 08:38:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2722576#M83084</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-24T08:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2725685#M83306</link>
      <description>&lt;P&gt;I will try this and get back to you with my findings, thank-you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp; &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 10:02:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2725685#M83306</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-25T10:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726284#M83351</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to find where to slot in your code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATETABLE (&lt;BR /&gt;ADDCOLUMNS (&lt;BR /&gt;SUMMARIZE ( 'CM', 'CM'[Date] ),&lt;BR /&gt;"Placement ID", "Placement ID",&lt;BR /&gt;"Cost-per-day",&lt;BR /&gt;[Impressions] / 1000 * 4&lt;BR /&gt;),&lt;BR /&gt;'CM'[Site] = "Programmatic"&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;..into my existing Calculated Costs-per-day table code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Calculated Costs-per-day table = &lt;/SPAN&gt;&lt;SPAN&gt;UNION&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Facebook'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Facebook'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Facebook'[Placement ID]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Facebook'[Cost-per-day]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Linkedin'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Linkedin'[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Linkedin'[Placement ID]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'Linkedin'[Cost-per-day]&lt;/SPAN&gt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&lt;SPAN&gt;[Cost-per-day]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I tried adding in your latest block of code at the very end of my existing code, &amp;amp; at various other points, but it keeps returning an error message&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Aug 2022 13:37:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726284#M83351</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-25T13:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726368#M83354</link>
      <description>&lt;P&gt;I think the below should work&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Calculated Costs-per-day table =
UNION (
    SUMMARIZE (
        'Facebook',
        'Facebook'[Date],
        'Facebook'[Placement ID],
        'Facebook'[Cost-per-day]
    ),
    SUMMARIZE (
        'Linkedin',
        'Linkedin'[Date],
        'Linkedin'[Placement ID],
        'Linkedin'[Cost-per-day]
    ),
    SUMMARIZE (
        'SA360CLICKS',
        'SA360CLICKS'[Date],
        'SA360CLICKS'[Placement ID],
        'SA360CLICKS'[Cost-per-day]
    ),
    SELECTCOLUMNS (
        GENERATE (
            SELECTCOLUMNS (
                FILTER ( 'Build Sheet', 'Build Sheet'[Cost-per-day] &amp;gt; 0 ),
                "Start Date", 'Build Sheet'[Start Date],
                "End Date", 'Build Sheet'[End Date],
                "Placement ID", 'Build Sheet'[Placement ID],
                "Cost-per-day", 'Build Sheet'[Cost-per-day]
            ),
            CALENDAR ( [Start Date], [End Date] )
        ),
        "Date", [Date],
        "Placement ID", [Placement ID],
        "Cost-per-day", [Cost-per-day]
    ),
    CALCULATETABLE (
        ADDCOLUMNS (
            SUMMARIZE ( 'CM', 'CM'[Date] ),
            "Placement ID", "Placement ID",
            "Cost-per-day",
                [Impressions] / 1000 * 4
        ),
        'CM'[Site] = "Programmatic"
    )
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 Aug 2022 13:56:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726368#M83354</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-25T13:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726539#M83362</link>
      <description>&lt;P&gt;thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;almost there now, but there's one field that PBI won't accept; please see attached screenshot.&lt;/P&gt;&lt;P&gt;I checked this field, and it is in my CM table, and it appears exactly as we've typed it in the code, so I can't see what the issue is.&amp;nbsp; &amp;nbsp;I even tried adding brackets to our expression, but the error message just won't go away&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 14:54:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726539#M83362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-25T14:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726554#M83363</link>
      <description>&lt;P&gt;Its expecting a measue. Replace the Impressions line with&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATE( SUM('CM'[Impressions])) * 1000 / 4&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 14:58:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726554#M83363</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-25T14:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726705#M83379</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code is accepted by PBI, but it doesn't create the results we were looking for.&amp;nbsp; Looking at the CM table, filtering to site[CM360] - 'programmatic', we see this placement ID, as an example,&amp;nbsp;329322853, has over 16,000 impressions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In other words, we'd expect that placement ID (329322853) to now appear in our calculated costs table, and we'd expect a calculated cost too based on our expression (impression/1000)*£4.00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, this ID,&amp;nbsp;329322853, doesn't appear in our calculated costs table.&amp;nbsp; It would appear that none of the programmatic placement ID's nor impressions were taken and used from the CM table because if you look at the frontend (screenshot attached), programmatic still has a blank entry in the Spend column:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I can't figure this out because our code looks fine and makes sense to me&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 15:48:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726705#M83379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-25T15:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726738#M83381</link>
      <description>&lt;P&gt;looking at the model data, the column 'CM'[Site (360)] doesn't contain any entries which exactly match "Programmatic", it is "Programmatic Ads - Crimtan Agency"&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 15:56:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726738#M83381</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-25T15:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726753#M83383</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp; &amp;nbsp;I've used that in my script, but&amp;nbsp; we're not seeing the desired results in the outputed table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 16:03:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726753#M83383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-25T16:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726781#M83384</link>
      <description>&lt;P&gt;Its not pulling the value of the placement ID, just the text "Placement ID"&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;CALCULATETABLE (
    ADDCOLUMNS (
        SUMMARIZE ( 'CM', 'CM'[Date], 'CM'[Placement ID] ),
        "Cost-per-day",
            CALCULATE( SUM([Impressions])) / 1000 * 4
    ),
    'CM'[Site] = "Programmatic Ads - Crimtan Agency"
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 Aug 2022 16:10:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726781#M83384</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2022-08-25T16:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need to populate CALCULATED table with dates and other values taken form the lookup table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726810#M83387</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp; the results looks promising at this stage.&amp;nbsp; I'll perform further testing of the data, thank-you so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; will come back with the results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 16:21:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-to-populate-CALCULATED-table-with-dates-and-other-values/m-p/2726810#M83387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-25T16:21:22Z</dc:date>
    </item>
  </channel>
</rss>

