Formula to Count item per Week
Hi
I Need a Formula to count the amount of 'Rev A' per Week
Example Week 15 - 3
Week 16 - 1
8 replies
-
How will you be displaying the data?
In a view element?
In a formula field that shows text?
In a formula field that is using another field that has the week number?
The main question is how will you tell the formula to count this many records with a particular week number?
-
The following code assumes you are in the same table as the reference field 'Issues A':
let listofWeeks := sort(unique('Issues A'.Week)); let crtn := urlDecode("%0A"); let display := for loop1 in listofWeeks do "Week " + loop1 + " - " + count('Issues A'[Week = loop1]) end; join(display, crtn)
Line 1: creates a unique list of the data in the field Week from the reference field 'Issues A' then sorts them in numerical order.
Line 2: creates a variable with a carriage return to be used later.
Lines 3 - 5: creates a variable to store the counting of each instance that was found in line 1.
Line 6: uses the join() command to arrange each instance of the loop in the display variable with a carriage return.
Content aside
- Status Answered
- 1 yr agoLast active
- 8Replies
- 111Views
-
2
Following