<?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 Create Graph with Date difference and age bucket in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4636959#M177536</link>
    <description>&lt;P&gt;Please make an effort to provide sample data in usable format, not as a screenshot.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Apr 2025 14:10:32 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2025-04-03T14:10:32Z</dc:date>
    <item>
      <title>How Create Graph with Date difference and age bucket</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4636821#M177530</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data like 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;Logic for Age is : Created date -Today date&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bucket is based on age : if it is &amp;lt;30 days then "&amp;lt;30", if &amp;lt;60 and &amp;gt;31 days then "&amp;lt;60 "&lt;/P&gt;&lt;P&gt;&amp;nbsp;I need to show in graphs like below :&amp;nbsp;&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;Please attache Power BI file for reference .&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 13:01:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4636821#M177530</guid>
      <dc:creator>nish18_1990</dc:creator>
      <dc:date>2025-04-03T13:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: How Create Graph with Date difference and age bucket</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4636959#M177536</link>
      <description>&lt;P&gt;Please make an effort to provide sample data in usable format, not as a screenshot.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 14:10:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4636959#M177536</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-04-03T14:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: How Create Graph with Date difference and age bucket</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4636980#M177538</link>
      <description>&lt;P&gt;You can use the techniques described in&amp;nbsp;&lt;A href="https://www.daxpatterns.com/static-segmentation/" target="_self"&gt;https://www.daxpatterns.com/static-segmentation/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 14:30:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4636980#M177538</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-04-03T14:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: How Create Graph with Date difference and age bucket</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4637570#M177557</link>
      <description>&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Category&lt;/TD&gt;&lt;TD&gt;Quantity Q2&lt;/TD&gt;&lt;TD&gt;country&lt;/TD&gt;&lt;TD&gt;Created date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tables&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;23/05/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cars&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;21/01/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bikes&lt;/TD&gt;&lt;TD&gt;40&lt;/TD&gt;&lt;TD&gt;China&lt;/TD&gt;&lt;TD&gt;21/03/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Chairs&lt;/TD&gt;&lt;TD&gt;13&lt;/TD&gt;&lt;TD&gt;India&lt;/TD&gt;&lt;TD&gt;21/01/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tables&lt;/TD&gt;&lt;TD&gt;22&lt;/TD&gt;&lt;TD&gt;India&lt;/TD&gt;&lt;TD&gt;21/02/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Cars&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;India&lt;/TD&gt;&lt;TD&gt;21/01/2025&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Bikes&lt;/TD&gt;&lt;TD&gt;60&lt;/TD&gt;&lt;TD&gt;India&lt;/TD&gt;&lt;TD&gt;30/01/2025&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 04 Apr 2025 05:04:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4637570#M177557</guid>
      <dc:creator>nish18_1990</dc:creator>
      <dc:date>2025-04-04T05:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: How Create Graph with Date difference and age bucket</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4637571#M177558</link>
      <description>&lt;P&gt;please find the attached table&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 05:05:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4637571#M177558</guid>
      <dc:creator>nish18_1990</dc:creator>
      <dc:date>2025-04-04T05:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: How Create Graph with Date difference and age bucket</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4637655#M177567</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1246057" data-lia-user-login="nish18_1990" class="lia-mention lia-mention-user"&gt;nish18_1990&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for using Microsoft Community Forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the approach to achieving your desired bar chart visualization in Power BI based on your sample data.&lt;/P&gt;
&lt;P&gt;Open Power BI Desktop, go to Home &amp;gt; Get Data, choose Excel or CSV, select your file, and click Load to import the data.&lt;/P&gt;
&lt;P&gt;To calculate age, create a new column in Power BI using this DAX formula:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Age = DATEDIFF(TODAY(), 'Sheet1'[Created date], DAY)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;This will give the number of days between today and the created date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To group records by age range, create a new column using this DAX formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bucket =&lt;/P&gt;
&lt;P&gt;IF('Sheet1'[Age] &amp;lt; 30, "&amp;lt;30",&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; IF('Sheet1'[Age] &amp;lt;= 60, "&amp;lt;60",&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; IF('Sheet1'[Age] &amp;lt;= 90, "&amp;gt;30 - 60",&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "&amp;gt;60"&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will categorize each record into buckets like &amp;lt;30, &amp;lt;60, &amp;gt;30 - 60, and &amp;gt;60 based on the age in days.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create the bar chart, go to the Report View in Power BI and select the Clustered Column Chart from the Visualizations pane. Drag Created date to the X-axis, Sum of Quantity Q2 to the Y-axis, and Bucket to the Legend. Then, format the chart by sorting it by Created Date, adjusting the colors for each bucket, and renaming the chart to "Sum of Quantity Q2 by Created Date and Age Bucket.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Apr 2025 06:49:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4637655#M177567</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-04-04T06:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: How Create Graph with Date difference and age bucket</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4645991#M177843</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1246057" data-lia-user-login="nish18_1990" class="lia-mention lia-mention-user"&gt;nish18_1990&lt;/a&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We haven’t heard from you on the last response and was just checking back to see if your query was answered.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Otherwise, will respond back with the more details and we will try to help .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If our response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it. Please let us know if there’s anything else we can do to help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Apr 2025 04:44:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Create-Graph-with-Date-difference-and-age-bucket/m-p/4645991#M177843</guid>
      <dc:creator>v-sgandrathi</dc:creator>
      <dc:date>2025-04-10T04:44:30Z</dc:date>
    </item>
  </channel>
</rss>

