<?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: Creating an area chart to show total number of hours worked weekly over a set duration in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671462#M142425</link>
    <description>&lt;P&gt;Hi Mate,&amp;nbsp; In that case you will need to use power query.&lt;/P&gt;&lt;P&gt;Below is the exactly what you need&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Follow the steps Below:&lt;/P&gt;&lt;P&gt;Import the original data:&lt;/P&gt;&lt;P&gt;Go to Transform data:&lt;/P&gt;&lt;P&gt;click on advanced editor;&lt;/P&gt;&lt;P&gt;use the power query as below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Your Source,
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Topic", type text}, {"week number", Int64.Type}, {"EST DURATION (WEEKS)", Int64.Type}, {"Est Probable hours weeks", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Week List", each List.Numbers([#"week number"], [#"EST DURATION (WEEKS)"])),
    #"Expanded Week List" = Table.ExpandListColumn(#"Added Custom", "Week List"),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Week List",{{"Week List", "Week name"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Week name", Int64.Type}}),
    #"Renamed Columns1" = Table.RenameColumns(#"Changed Type1",{{"Week name", "Total Weeks"}})
in
    #"Renamed Columns1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Will Definetly work !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark it Correct !!&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2024 23:23:24 GMT</pubDate>
    <dc:creator>Rabi</dc:creator>
    <dc:date>2024-01-31T23:23:24Z</dc:date>
    <item>
      <title>Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3670821#M142397</link>
      <description>&lt;P&gt;I am a relatively new Power BI user, creating a number of dashboards and reports using Dynamics CRM data, specifically the Opportunities table. For each opportunity, which represents a project, we track the estimated number of hours the project will take, the date it will start and how many weeks duration it will be. From that I have calculated fields to show the week of the year (1 - 52) the project will start and how many hours per week will be required.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table below is a representation of that data. The column titles are the actual column titles or field names in my data set.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to do is have Power BI take that data and turn it into a weekly schedule of the number of hours that will be worked each week over the duration of the project as shown in the example below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From that I need to create an area chart that shows a graphical representation of the total hours that will be worked each week across all projects, as shown below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I have the data table, creating the area chart is no problem. Or if I can skip the middle step and go straight from my main data table to the chart, even better. as long as I'm getting the correct weekly totals, I just cannot figure out what formula I need to tell Power BI how to distribute the hours across the right number of weeks. Can anyone shed any light on how to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 16:27:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3670821#M142397</guid>
      <dc:creator>nancymurray</dc:creator>
      <dc:date>2024-01-31T16:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671366#M142422</link>
      <description>&lt;P&gt;Hi Mate,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure what you are trying to achieve, Based on your data set you dont really need any DAX to visualise the data.&lt;/P&gt;&lt;P&gt;Below are the steps:&lt;/P&gt;&lt;P&gt;1) Add week name using the dax below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;week Name = "Week" &amp;amp; Sheet1[week number]&lt;/LI-CODE&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;2) Visualise as below for the table&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) Visualise as below for the area chart&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark it correct if this helped !!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 22:23:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671366#M142422</guid>
      <dc:creator>Rabi</dc:creator>
      <dc:date>2024-01-31T22:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671389#M142423</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="609564" data-lia-user-login="Rabi" class="lia-mention lia-mention-user"&gt;Rabi&lt;/a&gt;, but this isn't quite what I need. What you've given me is just the hours for the first week of the project. What I need the graph to reflect is all project hours across the full duration of the project. So if you refer to the table I provided in my original post, the first project ABC starts in week 1 and is 40 hours per week for five weeks (for a total of 200 hours), so weeks 1 through 5 should show 40 hours each for that project. Then the next project DEF starts in week 2 and is 10 hours per week for 3 weeks, so weeks 2, 3 &amp;amp; 4 should reflect 10 hours each. The total for each week will be the total number of hours worked for all projects that week, not just the projects that started that week.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The second table I provided is exactly the outcome I need, I just don't know the formula for the field that goes in the Y-axis to make Power BI distribute all the project hours correctly across the full number of weeks it will take to execute the project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does that clarify it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 22:38:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671389#M142423</guid>
      <dc:creator>nancymurray</dc:creator>
      <dc:date>2024-01-31T22:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671462#M142425</link>
      <description>&lt;P&gt;Hi Mate,&amp;nbsp; In that case you will need to use power query.&lt;/P&gt;&lt;P&gt;Below is the exactly what you need&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Follow the steps Below:&lt;/P&gt;&lt;P&gt;Import the original data:&lt;/P&gt;&lt;P&gt;Go to Transform data:&lt;/P&gt;&lt;P&gt;click on advanced editor;&lt;/P&gt;&lt;P&gt;use the power query as below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Your Source,
    Sheet1_Sheet = Source{[Item="Sheet1",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Topic", type text}, {"week number", Int64.Type}, {"EST DURATION (WEEKS)", Int64.Type}, {"Est Probable hours weeks", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Week List", each List.Numbers([#"week number"], [#"EST DURATION (WEEKS)"])),
    #"Expanded Week List" = Table.ExpandListColumn(#"Added Custom", "Week List"),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Week List",{{"Week List", "Week name"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Week name", Int64.Type}}),
    #"Renamed Columns1" = Table.RenameColumns(#"Changed Type1",{{"Week name", "Total Weeks"}})
in
    #"Renamed Columns1"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This Will Definetly work !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark it Correct !!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 23:23:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671462#M142425</guid>
      <dc:creator>Rabi</dc:creator>
      <dc:date>2024-01-31T23:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671487#M142426</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="609564" data-lia-user-login="Rabi" class="lia-mention lia-mention-user"&gt;Rabi&lt;/a&gt;&amp;nbsp;Yes, this is the exact result I need. For the data source, rather than importing a spreadsheet I am using data from the Opportunity table in our Microsoft Dynamics CRM. So I believe I need to make some adjustments to the first couple lines to correctly identify the data source.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I opened the advanced editor, it already had source information there, so right now I have the below (I have replaced our org number with x's for confidentiality):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;let&lt;BR /&gt;Source = CommonDataService.Database("orgxxxxxxxx.crm3.dynamics.com")&lt;BR /&gt;dbo_opportunity = Source{[Schema="dbo",Item="opportunity"]}[Data],&lt;BR /&gt;#"Promoted Headers" = Table.PromoteHeaders(Sheet1_Sheet, [PromoteAllScalars=true]),&lt;BR /&gt;#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Topic", type text}, {"week number", Int64.Type}, {"EST DURATION (WEEKS)", Int64.Type}, {"Est Probable hours weeks", Int64.Type}}),&lt;BR /&gt;#"Added Custom" = Table.AddColumn(#"Changed Type", "Week List", each List.Numbers([#"week number"], [#"EST DURATION (WEEKS)"])),&lt;BR /&gt;#"Expanded Week List" = Table.ExpandListColumn(#"Added Custom", "Week List"),&lt;BR /&gt;#"Renamed Columns" = Table.RenameColumns(#"Expanded Week List",{{"Week List", "Week name"}}),&lt;BR /&gt;#"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Week name", Int64.Type}}),&lt;BR /&gt;#"Renamed Columns1" = Table.RenameColumns(#"Changed Type1",{{"Week name", "Total Weeks"}})&lt;BR /&gt;in&lt;BR /&gt;#"Renamed Columns1"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is giving me an error message that says "Expression.SyntaxError: Token ',' expected." The screenshot below shows where it seems to be expecting a comma (if I'm interpreting the error message properly)&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you shed any light on how to fix this?&amp;nbsp; Thanks so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2024 23:48:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671487#M142426</guid>
      <dc:creator>nancymurray</dc:creator>
      <dc:date>2024-01-31T23:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671489#M142427</link>
      <description>&lt;P&gt;Hi Nancy,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = CommonDataService.Database("orgxxxxxxxx.crm3.dynamics.com"),
    dbo_opportunity = Source{[Schema="dbo",Item="opportunity"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(dbo_opportunity, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Topic", type text}, {"week number", Int64.Type}, {"EST DURATION (WEEKS)", Int64.Type}, {"Est Probable hours weeks", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Week List", each List.Numbers([#"week number"], [#"EST DURATION (WEEKS)"])),
    #"Expanded Week List" = Table.ExpandListColumn(#"Added Custom", "Week List"),
    #"Renamed Columns" = Table.RenameColumns(#"Expanded Week List",{{"Week List", "Week name"}}),
    #"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"Week name", Int64.Type}}),
    #"Renamed Columns1" = Table.RenameColumns(#"Changed Type1",{{"Week name", "Total Weeks"}})
in
    #"Renamed Columns1"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 31 Jan 2024 23:52:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671489#M142427</guid>
      <dc:creator>Rabi</dc:creator>
      <dc:date>2024-01-31T23:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671510#M142428</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="609564" data-lia-user-login="Rabi" class="lia-mention lia-mention-user"&gt;Rabi&lt;/a&gt;&amp;nbsp;thank you so much for your help. This removes the error message. It's now telling me the Topic column of the table wasn't found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A quick google search tells me the most common reason for this problem is that the column has been removed or renamed, however I have confirmed the column is definitely there and is spelled correctly, it's actually the key field in the table. The data type is text as indicated in the query. I'm at a loss to understand why the query isn't recognizing it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 00:12:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671510#M142428</guid>
      <dc:creator>nancymurray</dc:creator>
      <dc:date>2024-02-01T00:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an area chart to show total number of hours worked weekly over a set duration</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671513#M142429</link>
      <description>&lt;P&gt;Hi Nancy, May be just reload the Table and use the power query again !!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2024 00:14:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Creating-an-area-chart-to-show-total-number-of-hours-worked/m-p/3671513#M142429</guid>
      <dc:creator>Rabi</dc:creator>
      <dc:date>2024-02-01T00:14:22Z</dc:date>
    </item>
  </channel>
</rss>

