<?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: How to Aggregate Data Per Day, Week, Month, Year in Line Chart in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3749009#M50188</link>
    <description>&lt;P&gt;Add these fields one by one into the x axis hierarchy, and teach your users how to navigate up and dowm hierarchies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expect Power BI to enforce sampling of data, so the UX may be sub-optimal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also consider using zoom sliders on the x axis.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Mar 2024 14:08:54 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2024-03-07T14:08:54Z</dc:date>
    <item>
      <title>How to Aggregate Data Per Day, Week, Month, Year in Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3748889#M50186</link>
      <description>&lt;P&gt;Hi Power BI Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table with Date Column which has date, month, year in it like Thursday, March07, 2024 and&amp;nbsp; a time column with a 5 minute time interval timestamp for 24 hours and I have numerical columns. this is connected database via import mode and data keeps updating.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need urgent help in Creating Line Chart&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to show the numerical columns data on the Line Chart.&lt;/P&gt;&lt;P&gt;If I Selected a 1 Day the Line chart should show Hourly data of 24 hours.&lt;/P&gt;&lt;P&gt;if I Selected 2 Days the line chart should show 24 hour timestamps&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I selected more than two days it should show daily and if i selected week it should week same for month and year as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give a Solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 12:46:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3748889#M50186</guid>
      <dc:creator>Ibrahim_shaik</dc:creator>
      <dc:date>2024-03-07T12:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to Aggregate Data Per Day, Week, Month, Year in Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3749009#M50188</link>
      <description>&lt;P&gt;Add these fields one by one into the x axis hierarchy, and teach your users how to navigate up and dowm hierarchies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expect Power BI to enforce sampling of data, so the UX may be sub-optimal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also consider using zoom sliders on the x axis.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 14:08:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3749009#M50188</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-07T14:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Aggregate Data Per Day, Week, Month, Year in Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3749195#M50191</link>
      <description>&lt;P&gt;Thank you for the response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to use zoom slider on x axis?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 15:38:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3749195#M50191</guid>
      <dc:creator>Ibrahim_shaik</dc:creator>
      <dc:date>2024-03-07T15:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to Aggregate Data Per Day, Week, Month, Year in Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3749219#M50192</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbendlin_0-1709826470600.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1056040iF1B897251EBB54F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbendlin_0-1709826470600.png" alt="lbendlin_0-1709826470600.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 15:47:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3749219#M50192</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-07T15:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Aggregate Data Per Day, Week, Month, Year in Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3751234#M50223</link>
      <description>&lt;P&gt;But for my chart there is no option to apply zoom slider on X-axis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using the drill down but the data not aggregating to Hour. I have 5 minute interval timestamps 00:01:01, 00:05:01 like this, per day its aggregating when i drill up.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 10:58:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3751234#M50223</guid>
      <dc:creator>Ibrahim_shaik</dc:creator>
      <dc:date>2024-03-08T10:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to Aggregate Data Per Day, Week, Month, Year in Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3751643#M50226</link>
      <description>&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;&lt;BR /&gt;Do not include sensitive information or anything not related to the issue or question. &lt;BR /&gt;&lt;BR /&gt;If you are unsure how to upload data please refer to &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Want faster answers? &lt;A href="https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2024 14:49:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3751643#M50226</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-03-08T14:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to Aggregate Data Per Day, Week, Month, Year in Line Chart</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3762269#M50413</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/509602"&gt;@Ibrahim_shaik&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;, thanks for your concern about this case. I tried to create a sample data myself based on the user's requirement and implemented the result. Please check if there is anything that can be improved. Here is my solution:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_0-1710391744700.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059854i674DEE169A129D4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_0-1710391744700.png" alt="vyangliumsft_0-1710391744700.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create calculated column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Week = WEEKNUM('Table'[Date],1)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Month =
MONTH('Table'[Date])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Year = YEAR('Table'[Date])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Date_format =
 DATE(
    YEAR([Date]),MONTH([Date]),DAY([Date]))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Create calculated table -- Slicer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table 2 =
DISTINCT('Table'[Date_format])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_1-1710391744702.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059855i83F9979FC3ECAA6A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_1-1710391744702.png" alt="vyangliumsft_1-1710391744702.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;3. Modeling – New parameter –Fields.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_2-1710391811001.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059856iBDF3AD09211AFD66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_2-1710391811001.png" alt="vyangliumsft_2-1710391811001.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_3-1710391811004.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059857i8ECF88960AFAE062/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_3-1710391811004.png" alt="vyangliumsft_3-1710391811004.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_4-1710391826248.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059858i4A60E9CE1454F732/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_4-1710391826248.png" alt="vyangliumsft_4-1710391826248.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;4. Create measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _date=
SELECTCOLUMNS('Table 2',"date",'Table 2'[Date_format])
var _week=
SELECTCOLUMNS(FILTER(ALL('Table 2'),'Table 2'[Date_format] in _date),"week",WEEKNUM('Table 2'[Date_format],2))
var _count=
COUNTX(ALLSELECTED('Table 2'),'Table 2'[Date_format])
var _select=SELECTEDVALUE('Parameter'[Parameter Fields])
return
SWITCH(
    TRUE(),
  CONTAINSSTRING(_select,"Date")=TRUE()&amp;amp;&amp;amp;_count&amp;lt;=2 &amp;amp;&amp;amp;MAX('Table'[Date_format]) in _date,1,
  CONTAINSSTRING(_select,"Week")=TRUE()&amp;amp;&amp;amp;WEEKNUM(MAX('Table'[Date]),2) in _week ,1,0)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5. Treat Parameter[Parameter] as the x-axis of the slicer and the line graph, respectively.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_5-1710391833832.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059859i5D0760AD57C110A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_5-1710391833832.png" alt="vyangliumsft_5-1710391833832.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;6. Place [Flag]in Filters, set is=1, apply filter.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_6-1710391872572.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059860i54863A185B2056B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="vyangliumsft_6-1710391872572.png" alt="vyangliumsft_6-1710391872572.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;7. Result:&lt;/P&gt;
&lt;P&gt;Slicer Date_format :select tow dates Slicer Parameter: select week.&lt;/P&gt;
&lt;P&gt;Click Drill Down on the visual:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_7-1710391898627.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059861i71EF397A4D167ED0/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_7-1710391898627.png" alt="vyangliumsft_7-1710391898627.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_8-1710391898631.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059862i364C1DB44BBB39A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_8-1710391898631.png" alt="vyangliumsft_8-1710391898631.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Slicer Date_format :select multiple dates Slicer Parameter: select week.&lt;/P&gt;
&lt;P&gt;Click Drill Down on the visual:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_9-1710391921860.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059864i99703622C4BDCC97/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_9-1710391921860.png" alt="vyangliumsft_9-1710391921860.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyangliumsft_10-1710391921863.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1059863i610C817F2C372960/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyangliumsft_10-1710391921863.png" alt="vyangliumsft_10-1710391921863.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 08:18:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-to-Aggregate-Data-Per-Day-Week-Month-Year-in-Line-Chart/m-p/3762269#M50413</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-03-27T08:18:01Z</dc:date>
    </item>
  </channel>
</rss>

