<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:media="http://search.yahoo.com/mrss/" 
	>
<channel>
	<title>
	Comments on: Power Apps GroupBy and Ungroup Functions + 10 Examples	</title>
	<atom:link href="https://www.spguides.com/power-apps-groupby/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.spguides.com/power-apps-groupby/</link>
	<description>Learn SharePoint, Power Platform, SPFx, etc, SharePoint training courses</description>
	<lastBuildDate>Wed, 26 Mar 2025 12:54:24 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>
	<item>
		<title>
		By: Bhavin		</title>
		<link>https://www.spguides.com/power-apps-groupby/#comment-1079</link>

		<dc:creator><![CDATA[Bhavin]]></dc:creator>
		<pubDate>Wed, 01 May 2024 16:05:14 +0000</pubDate>
		<guid isPermaLink="false">https://www.spguides.com/?p=27866#comment-1079</guid>

					<description><![CDATA[I am working on one of power app where I want to create dashboard. I have created one SharePoint list (DataforCRM) where I have three columns (Hname, HardwareStatus and created (default) 

Thank you in advance for your time and comments. 

Question : I want to show or reflect the most recent status by showing only the latest HardwareStatus&quot;offline&quot; entries, unless they are followed by an &quot;online&quot; entry. If an &quot;online&quot; entry is created, it should remove the &quot;offline&quot; entry from the gallery.

Gallery 1 : (shows both Online and Offline entries from Sharepoint List)

Gallery 2 : (It should only show Offline for recent or last entry where there is no subsequent Online entry for same HName
 
To test if there is no delay issue, I have two buttons  to test it - 
Button 1: &quot;ColHardwareStatus&quot;
Button 2 :  &quot;colUniqueHardwareStatus&quot; 

Power Apps Strucutre : 

 
CountRows(
Distinct(
Filter(
DataforCRMApp,
HardwareStatus = &quot;Offline&quot; &#038;&#038;
Text(Created,&quot;dd/mm/yyyy&quot;) = Text(Today(),&quot;dd/mm/yyyy&quot;)
),
HName
)



ClearCollect(
    colUniqueHardwareStatus,
    AddColumns(
        GroupBy(
            Filter(
                colHardwareStatusToday, 
                HardwareStatus = &quot;Offline&quot; &#038;&#038; 
                IsEmpty(
                    Filter(
                        colHardwareStatusToday, // Ensure to reference the correct collection if changed above
                        HName = ThisRecord.HName,
                        HardwareStatus = &quot;Online&quot;,
                        Created &#062; ThisRecord.Created
                    )
                )
            ),
            HName,
            AllEntries
        ),
        LatestStatus, First(SortByColumns(ThisRecord.AllEntries, &quot;Created&quot;, SortOrder.Descending)).HardwareStatus,
        LatestDateTime, First(SortByColumns(ThisRecord.AllEntries, &quot;Created&quot;, SortOrder.Descending)).Created
    )
);



Timer button added  to automate - 

// Collect all relevant entries for the day
ClearCollect(
colHardwareStatusToday,
SortByColumns(
Filter(
DataforCRMApp,
Text(Created, &quot;dd/mm/yyyy&quot;) = Text(Today(), &quot;dd/mm/yyyy&quot;) &#038;&#038;
HName  Blank() &#038;&#038; HName  &quot;&quot;,
(HardwareStatus = &quot;Offline&quot; &#124;&#124; HardwareStatus = &quot;Online&quot;)
),
&quot;Created&quot;,
SortOrder.Descending
)
);

// Trigger the second timer after collection is updated
//UpdateContext({StartSecondTimer: true});
ClearCollect(
colUniqueHardwareStatus,
AddColumns(
GroupBy(
Filter(
colHardwareStatusToday,
HardwareStatus = &quot;Offline&quot; &#038;&#038;
IsEmpty(
Filter(
colHardwareStatusToday, // Ensure to reference the correct collection if changed above
HName = ThisRecord.HName,
HardwareStatus = &quot;Online&quot;,
Created &#062; ThisRecord.Created
)
)
),
HName,
AllEntries
),
LatestStatus, First(SortByColumns(ThisRecord.AllEntries, &quot;Created&quot;, SortOrder.Descending)).HardwareStatus,
LatestDateTime, First(SortByColumns(ThisRecord.AllEntries, &quot;Created&quot;, SortOrder.Descending)).Created
)
);]]></description>
			<content:encoded><![CDATA[<p>I am working on one of power app where I want to create dashboard. I have created one SharePoint list (DataforCRM) where I have three columns (Hname, HardwareStatus and created (default) </p>
<p>Thank you in advance for your time and comments. </p>
<p>Question : I want to show or reflect the most recent status by showing only the latest HardwareStatus&#8221;offline&#8221; entries, unless they are followed by an &#8220;online&#8221; entry. If an &#8220;online&#8221; entry is created, it should remove the &#8220;offline&#8221; entry from the gallery.</p>
<p>Gallery 1 : (shows both Online and Offline entries from Sharepoint List)</p>
<p>Gallery 2 : (It should only show Offline for recent or last entry where there is no subsequent Online entry for same HName</p>
<p>To test if there is no delay issue, I have two buttons  to test it &#8211;<br />
Button 1: &#8220;ColHardwareStatus&#8221;<br />
Button 2 :  &#8220;colUniqueHardwareStatus&#8221; </p>
<p>Power Apps Strucutre : </p>
<p>CountRows(<br />
Distinct(<br />
Filter(<br />
DataforCRMApp,<br />
HardwareStatus = &#8220;Offline&#8221; &amp;&amp;<br />
Text(Created,&#8221;dd/mm/yyyy&#8221;) = Text(Today(),&#8221;dd/mm/yyyy&#8221;)<br />
),<br />
HName<br />
)</p>
<p>ClearCollect(<br />
    colUniqueHardwareStatus,<br />
    AddColumns(<br />
        GroupBy(<br />
            Filter(<br />
                colHardwareStatusToday,<br />
                HardwareStatus = &#8220;Offline&#8221; &amp;&amp;<br />
                IsEmpty(<br />
                    Filter(<br />
                        colHardwareStatusToday, // Ensure to reference the correct collection if changed above<br />
                        HName = ThisRecord.HName,<br />
                        HardwareStatus = &#8220;Online&#8221;,<br />
                        Created &gt; ThisRecord.Created<br />
                    )<br />
                )<br />
            ),<br />
            HName,<br />
            AllEntries<br />
        ),<br />
        LatestStatus, First(SortByColumns(ThisRecord.AllEntries, &#8220;Created&#8221;, SortOrder.Descending)).HardwareStatus,<br />
        LatestDateTime, First(SortByColumns(ThisRecord.AllEntries, &#8220;Created&#8221;, SortOrder.Descending)).Created<br />
    )<br />
);</p>
<p>Timer button added  to automate &#8211; </p>
<p>// Collect all relevant entries for the day<br />
ClearCollect(<br />
colHardwareStatusToday,<br />
SortByColumns(<br />
Filter(<br />
DataforCRMApp,<br />
Text(Created, &#8220;dd/mm/yyyy&#8221;) = Text(Today(), &#8220;dd/mm/yyyy&#8221;) &amp;&amp;<br />
HName  Blank() &amp;&amp; HName  &#8220;&#8221;,<br />
(HardwareStatus = &#8220;Offline&#8221; || HardwareStatus = &#8220;Online&#8221;)<br />
),<br />
&#8220;Created&#8221;,<br />
SortOrder.Descending<br />
)<br />
);</p>
<p>// Trigger the second timer after collection is updated<br />
//UpdateContext({StartSecondTimer: true});<br />
ClearCollect(<br />
colUniqueHardwareStatus,<br />
AddColumns(<br />
GroupBy(<br />
Filter(<br />
colHardwareStatusToday,<br />
HardwareStatus = &#8220;Offline&#8221; &amp;&amp;<br />
IsEmpty(<br />
Filter(<br />
colHardwareStatusToday, // Ensure to reference the correct collection if changed above<br />
HName = ThisRecord.HName,<br />
HardwareStatus = &#8220;Online&#8221;,<br />
Created &gt; ThisRecord.Created<br />
)<br />
)<br />
),<br />
HName,<br />
AllEntries<br />
),<br />
LatestStatus, First(SortByColumns(ThisRecord.AllEntries, &#8220;Created&#8221;, SortOrder.Descending)).HardwareStatus,<br />
LatestDateTime, First(SortByColumns(ThisRecord.AllEntries, &#8220;Created&#8221;, SortOrder.Descending)).Created<br />
)<br />
);</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Olga Melo		</title>
		<link>https://www.spguides.com/power-apps-groupby/#comment-585</link>

		<dc:creator><![CDATA[Olga Melo]]></dc:creator>
		<pubDate>Sat, 18 Dec 2021 20:06:41 +0000</pubDate>
		<guid isPermaLink="false">https://www.spguides.com/?p=27866#comment-585</guid>

					<description><![CDATA[Thank you for this post! It was exactly what I was looking for 👏👏👏]]></description>
			<content:encoded><![CDATA[<p>Thank you for this post! It was exactly what I was looking for 👏👏👏</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Dinesh		</title>
		<link>https://www.spguides.com/power-apps-groupby/#comment-583</link>

		<dc:creator><![CDATA[Dinesh]]></dc:creator>
		<pubDate>Thu, 16 Dec 2021 11:21:10 +0000</pubDate>
		<guid isPermaLink="false">https://www.spguides.com/?p=27866#comment-583</guid>

					<description><![CDATA[Hi, can u pls tell me How to group by multi select choice column values]]></description>
			<content:encoded><![CDATA[<p>Hi, can u pls tell me How to group by multi select choice column values</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
