<?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 Complex grouping calculation on each date in Matrix Visualization in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-grouping-calculation-on-each-date-in-Matrix/m-p/3242506#M157212</link>
    <description>&lt;P&gt;Hi Community,&lt;BR /&gt;I am trying to use Power BI Desktop to add some analytic capabilities in my project and need assistance with measuring DAX expression&lt;BR /&gt;Here is my data topology&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;ConfigId&lt;/TD&gt;&lt;TD&gt;ByDate&lt;/TD&gt;&lt;TD&gt;RowNumber&lt;/TD&gt;&lt;TD&gt;UserId&lt;/TD&gt;&lt;TD&gt;LastupdatedUTC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01/01/2022&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;01/01/2022T00:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Users with UserId from Country can request report generation with ConfigId for Year&lt;BR /&gt;Then report flows Requested -&amp;gt; Pending -&amp;gt; Completed/Failed it can be done in few days for 1 user&lt;BR /&gt;Having a table with provided topology for all users I need to Calculate stats on each day:&lt;BR /&gt;1. Reports count rows By Country, Year, Status, ConfigID on each day district by userId&lt;BR /&gt;&lt;BR /&gt;So, in general, I need to have a matrix visualization with Country, Year, Status, ConfigID as rows and ByDate as columns, values should be calculated following logic:&lt;BR /&gt;1. Set ByDate as a boundary, filter about all records after ByDate&lt;BR /&gt;2. Group filtered dataset by Country, UserId, Year, ConfigId and select the top 1 record from each group ordered by LastUpdatedUtc&lt;BR /&gt;3. Result of grouping and selecting top 1 record from each group should be grouped a second time by Country, Year, Status, ConfigId and calculate rows count of each group&lt;BR /&gt;&lt;BR /&gt;As a result, measure DAX should return the cumulative state of reports generation history on each day&lt;BR /&gt;&lt;BR /&gt;Issue: in matrix visualization can not find a way to use ByDate Column just like a boundary but not include it in the group by DAX&lt;BR /&gt;&lt;BR /&gt;Please assist if it is possible or suggest please a better solution.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 14:57:29 GMT</pubDate>
    <dc:creator>Ganikuss</dc:creator>
    <dc:date>2023-05-18T14:57:29Z</dc:date>
    <item>
      <title>Complex grouping calculation on each date in Matrix Visualization</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-grouping-calculation-on-each-date-in-Matrix/m-p/3242506#M157212</link>
      <description>&lt;P&gt;Hi Community,&lt;BR /&gt;I am trying to use Power BI Desktop to add some analytic capabilities in my project and need assistance with measuring DAX expression&lt;BR /&gt;Here is my data topology&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Country&lt;/TD&gt;&lt;TD&gt;Status&lt;/TD&gt;&lt;TD&gt;Year&lt;/TD&gt;&lt;TD&gt;ConfigId&lt;/TD&gt;&lt;TD&gt;ByDate&lt;/TD&gt;&lt;TD&gt;RowNumber&lt;/TD&gt;&lt;TD&gt;UserId&lt;/TD&gt;&lt;TD&gt;LastupdatedUTC&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USA&lt;/TD&gt;&lt;TD&gt;Pending&lt;/TD&gt;&lt;TD&gt;2022&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;01/01/2022&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;01/01/2022T00:00:00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Users with UserId from Country can request report generation with ConfigId for Year&lt;BR /&gt;Then report flows Requested -&amp;gt; Pending -&amp;gt; Completed/Failed it can be done in few days for 1 user&lt;BR /&gt;Having a table with provided topology for all users I need to Calculate stats on each day:&lt;BR /&gt;1. Reports count rows By Country, Year, Status, ConfigID on each day district by userId&lt;BR /&gt;&lt;BR /&gt;So, in general, I need to have a matrix visualization with Country, Year, Status, ConfigID as rows and ByDate as columns, values should be calculated following logic:&lt;BR /&gt;1. Set ByDate as a boundary, filter about all records after ByDate&lt;BR /&gt;2. Group filtered dataset by Country, UserId, Year, ConfigId and select the top 1 record from each group ordered by LastUpdatedUtc&lt;BR /&gt;3. Result of grouping and selecting top 1 record from each group should be grouped a second time by Country, Year, Status, ConfigId and calculate rows count of each group&lt;BR /&gt;&lt;BR /&gt;As a result, measure DAX should return the cumulative state of reports generation history on each day&lt;BR /&gt;&lt;BR /&gt;Issue: in matrix visualization can not find a way to use ByDate Column just like a boundary but not include it in the group by DAX&lt;BR /&gt;&lt;BR /&gt;Please assist if it is possible or suggest please a better solution.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 14:57:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Complex-grouping-calculation-on-each-date-in-Matrix/m-p/3242506#M157212</guid>
      <dc:creator>Ganikuss</dc:creator>
      <dc:date>2023-05-18T14:57:29Z</dc:date>
    </item>
  </channel>
</rss>

