Hi,
Create this variable and use for the Unit column. Unit_v=IF([Code]=“SITE”;Count([Unit]);[Unit])
Try this code if it helps you.
Below are few examples:
Count(“Test”) returns 1
Count([City]; DISTINCT) returns 5 if there are 5 different cities in a list of cities, even if there are more than 5 rows in the list due to duplication.
Count([City]; ALL) returns 10 if there are 10 cities in a list of cities, even though some are duplicated.
Count ([City]; INCLUDEEMPTY) returns 6 if there are 5 cities and one blank row in a list of cities.
The formula is not working.it throws me error.i tryied in different ways with foreach,forall but iam getting the all the units count.
i need count where all the documents should be site.
I think you might need to attach a screenshot of your actual document so we can see exactly what the problem is… the only reason the formulas above wouldn’t work that I can think of, is if you have sections or other breaks which would reset the counters.