sum calculated values from text field in Access Report - ms-access-2016

I am hoping the images I have pasted are visible to you.
I have a report that is calculating a fractional value (for an election)
I want to add these values together. I tried the =Sum and used running sum, and have had more success with =NZ. But the most I can get is the value of the last field rather than the total of all the fields in that column.
Hope you can help
enter image description here
enter image description here

Related

Having problems converting formulas to arrays

Here is the sample workbook: https://docs.google.com/spreadsheets/d/1FqkXO8sdpeP9GPerdg8o2zcSiTV7o8gA-07iBvqw4Yw/edit#gid=1252102463
I'm working off the size tab but I have a "workingsize" tab that someone helped me with. The formulas in that sheet are working great.
ColN in Size corresponds to ColR in WorkingSize. In the absence of context, I'm looking for those two outputs to be identical and can't figure out how to get the formulas to behave correctly.
For more context on Size:
Eventually, the data entered into the red section will exist on an entirely different sheet. I'm good at referencing between sheets but just wanted everyone to be aware. This is the data I'm having trouble with.
in K6 & below, you enter in a type of pizza. right now it's free text but ultimately, it will be a drop down from the range A2:A. That range also matches the headers in F3:H3. In theory, as new items are added to the A2 range, new columns will appear here.
ColL is a number - it represents a dough ball weight.
ColM is identifying which column from the table to be searching against.
ColN then takes the weight, rounds it to the nearest value in the corresponding col for type, and then outputs the corresponding size.
ColN in Size is my attempt to take the formulas from colR in workingsize and turn them into an array.
You can try with XLOOKUP. With INDEX and XMATCH you narrow the weightes by the match on the name of the column. Then with MAP you can convert it in an array. Change the last -1 to 1 if you want to round it up instead of down:
=MAP(K6:K,L6:L,LAMBDA(type,wt,IF(wt="","",XLOOKUP(wt,INDEX(E4:H,,XMATCH(type,E3:H3)),D4:D,,-1))))
PS: I deleted the column of key value, since it was not necessary
UPDATE:
To find closest value, you can use this: it sorts D column by the absolute value of the difference between the corresponding column and the weight. SORTN and the first 1 returns only the first value, meaning the closest to the weight
=MAP(K6:K,L6:L,LAMBDA(type,wt,IF(wt="","",SORTN(D4:D,1,,BYROW(INDEX(E4:H,,XMATCH(type,E3:H3)),LAMBDA(d,ABS(wt-d))),1))))
Let me know!

Exclude specific cells from being included in a formula's calculation, even if said cells are referenced by the formula

I maintain a spreadsheet for a virtual racing competition. Within it, I have to log the times of each racer and how many points they have earned. I do so by importing a .csv file for each race (the import takes place on a secondary document, which is linked to the main one via DGET if that matters).
Screenshot of a spreadsheet page
In Column G, I calculate the total time for all races, via basic addition: =C5+E5, =C6+E6 etc.
But sometimes racers crash, which automatically replaces their time (HH:MM:SS.MsMs) in the .csv file, with a percentage value (%) denoting how far they got when they crashed. This causes the addition formula to spit out a wildly inaccurate result, as the software does its best to add a time value and a percentage value which represent a distance together.
Can I write a formula which only adds together the cells which have the proper time format?
So, for example, I set X99, Y99, and Z99, to be added together, but if Y99 contains a percentage value, it is excluded from the calculation, and the final output is the value of X99+Z99
Something like this?
= IF(REGEXMATCH(TO_TEXT(X99),"%"),0,X99)
+ IF(REGEXMATCH(TO_TEXT(Y99),"%"),0,Y99)
+ IF(REGEXMATCH(TO_TEXT(Z99),"%"),0,Z99)
It turns the number into a text string, then searches for a "%" in the string; if it finds one it adds 0, otherwise adds the time value.
Documentation:
REGEXMATCH
IF

In EazyBi, How can I do a substring of a dimension name

I have a dimension that has this structure :, example: JIRA-525:Ticket Summary.
I'd like to extract the second part, but with no positive result.
I tried to create a custom field on that dimension and do a string operation, I know this won't give me expected result, but a basic string function is not working, as the grid is showing errors:
left([Concept].CurrentMember.Name,10)
What should I do differentñy?
The error message could give us some hints on what is wrong here. If you created a new calculated measure with the formula, it should return results.
Define a new calculated measure (measure not member, sometimes people mix them up) with the formula below:
[Concept].CurrentMember.AllProperties
Does that return any results with the dimension on rows? Does it have a "Name" property?
Ultimately, I would suggest creating a new calculated measure with ExtractString() function - https://docs.eazybi.com/eazybi/analyze-and-visualize/calculated-measures-and-members/mdx-function-reference/extractstring. But first see what properties are available.
If you are looking to change the dimension member names, then that can be done only with JavaScript calculated custom fields - https://docs.eazybi.com/eazybijira/data-import/custom-fields/javascript-calculated-custom-fields.

Adding calculated fields to Google-Sheets form results

I'm taking data with a Google Spreadsheet form.
But for grouping puproses I want to add a column in the result-table with the weeknumber.
I also want a calculated field in my result-table.
Is this even possible? And what is the best way to accomplish this?
edit: hope this works.
this is the spreadsheet generated (and filled) by the form. Not the real one, just an example one.
https://docs.google.com/spreadsheets/d/1WXqNiP9EIx3lA0ND1ysFitfN9QVEGVXY2SI5cHF57oA/edit?usp=sharing
As said, I would like to be able to add a weeknumber field, and get a calculated field (total (Amount * Price))
The Calculated field can propabably be achieved with a query on a second Sheet. But I can't use a 'Weeknum()' in a query and group by it.
For the week number, paste in the first cell of the column of your choice (e.g. E2):
=arrayformula(WEEKNUM(A2:A))
For the calculated product field, e.g. in F2:
=ARRAYFORMULA(C2:C*D2:D)
The results of the array formulas will automatically update when new form responses come into the spreadsheet.

Average time durations in google form populated google sheet

I have a google sheet that is auto populated from a google form. There is a column with time durations:
When I try to average these durations I get the divide by zero error. I tried changing the cell format, but nothing works. And in fact, it wont change at all no matter what format I choose. I think the format is locked based on the form that is populating the sheet.
Any help on getting the average in a cell below the column?
Please try a formula of this kind:
=sum(ArrayFormula(1*(A1:A15)))/counta(A1:A15)
with formatting to suit.
The problem is you are getting values as text.
=ArrayFormula(AVERAGEIF(A1:A18*1,">0"))
*1 converts text into a number
condition ">0" to skip empty cells, converted to 0.
format the result as duration.

Resources