Hi.
I have and SP list with 20K records (and increasing...). In a screen I see the details of a selected house using filter with delegation, in a Gallery
But i have to show and abstract of the gallery. the times "Habitación" is repeated. In a table:
Column 1: "Hab."&Distinct value.
Column 2: Times repeates each distinct value
Is this possible in PowerApps?
Thank you
Solved! Go to Solution.
Hi @FrancoGR ,
This will sum the NroCrama in each NroHab
AddColumns(
GroupBy(
GAL_CASA.AllItems,
"NroHab",
"OtherData"
),
"CramaNo",
Sum(
OtherData,
NroCrama
)
)
You can call the field name I have used CramaNo whatever you want.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @FrancoGR ,
Use this code.
ClearCollect(test1,Distinct(YourDataSource,ColumnOfHabitacion));
ClearCollect(test2,ForAll(test1,CountRows(Filter(YourDataSource,ColumnOfHabitacion=Result))));
Clear(MergeTest);
ForAll(
Sequence(CountRows(test1)),
Collect(MergeTest,
{
ColumnOfHabitacion:First(test1).Result,
count:First(test2).Value
})
);
Then use the MergeTest as data source to get your needs.
-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Hi @FrancoGR ,
What are the Items of the Gallery as you are currently filtering them? The GroupBy() function (which is what you need) is not Delegable, so you have to "pre-filter" the output to under 2,000 records with a Delegable filter to achieve the result.
@Ashwin7104 , thank you but that is not what I need (already used it to filter the gallery and works fine)
The problem is I can use count, count if formulas with the data source because of the number of records. so i need to count the disctint values in the gallery.
Thanks.
Thanks @Boynog , but I have in the same screen a form to add records, so the gallery updates simultaneously and the abstract table should do it too. Using collection "copy" all the register previous to the updates I make in the form.
Hi @WarrenBelz I use the "pre-filter" in the gallery, That's what I need to count the disctint values in the gallery.
HI @FrancoGR ,
Assuming you have the data you require in the Gallery, this should get the values you are after. I have assumed the field name here (Habiticon)
AddColumns(
GroupBy(
YourGalleryName.AllItems,
"Habiticon",
"OtherData"
),
"CountNo",
CountRows(OtherData)
)
You could also use the GroupBy on the collection that forms the gallery.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
@WarrenBelz I think it will work, but I have some doubts.
The filtered Gallery (GAL_CASA) have the fields NroHab and NroCama so the table has to show the quantity of NroCama are in NroHab (the count of beds in a room in a house)
I can get the number counting the distinct values. Where I have to put the formula?
Thank you
Hi @FrancoGR ,
This will sum the NroCrama in each NroHab
AddColumns(
GroupBy(
GAL_CASA.AllItems,
"NroHab",
"OtherData"
),
"CramaNo",
Sum(
OtherData,
NroCrama
)
)
You can call the field name I have used CramaNo whatever you want.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
199 | |
52 | |
41 | |
39 | |
35 |
User | Count |
---|---|
263 | |
86 | |
71 | |
69 | |
66 |