Hey Guys,
i want to only make unique and first dates visible in my gallery.
At the momen the gallery looks like this
01.06.2022 Data
01.06.2022 Data
02.06.2022 Data
02.06.2022 Data
And I want to make it look like this
01.06.2022 Data
Data
02.06.2022 Data
Data
This is how far i have come (under visible i have the following code):
If(
Index(
Filter(Time;Text(Starttime;"dd/mm/yyyy")=Text(ThisItem.Starttime;"dd/mm/yyyy"));1).ID =ThisItem.ID;true;false)
This code only displays the unique dates, but i also want the first of the not unique dates.
Can somebody help me?
Solved! Go to Solution.
Hi @Drep,
Could you please tell me if your DataSource is SharePoint?
1. You can use the CountRows function to nest filter functions: The fliter function is used to filter out the records whose date column of the data source is equal to the ThisItem. date column. The CountRows function is used to count the number of filtered records.
2. If the result of CountRows is equal to 1, it means that the date of the record is unique, set its visible property to true.
3. If the CountRows result is greater than 1, it proves that there are multiple records with the same date. Use the LookUp function to get the record with the smallest ID among the records with the same date, and make its Visible property true(ID is a column that comes with SharePoint).
I have made a test for your reference:
1.
2.
3.
Best Regards,
Levi
Hi @Drep,
Could you please tell me if your DataSource is SharePoint?
1. You can use the CountRows function to nest filter functions: The fliter function is used to filter out the records whose date column of the data source is equal to the ThisItem. date column. The CountRows function is used to count the number of filtered records.
2. If the result of CountRows is equal to 1, it means that the date of the record is unique, set its visible property to true.
3. If the CountRows result is greater than 1, it proves that there are multiple records with the same date. Use the LookUp function to get the record with the smallest ID among the records with the same date, and make its Visible property true(ID is a column that comes with SharePoint).
I have made a test for your reference:
1.
2.
3.
Best Regards,
Levi
Hi @v-liwei-msft ,
thank you very much for your answer & solution.
Yes i am working with an Sharepoint list.
My solution now looks like this:
If(
If(
CountRows(
Filter(
Zeiterfassung;
Startdatum = ThisItem.Startdatum; Person.Id = ThisItem.Person.Id
)
) > 1;
LookUp(
Zeiterfassung;
Startdatum = ThisItem.Startdatum And Person.Id = ThisItem.Person.Id
).ID
) = ThisItem.ID;
true;
CountRows(
Filter(
Zeiterfassung;
Startdatum = ThisItem.Startdatum; Person.Id = ThisItem.Person.Id
)
) = 1;
true
)