How to count sum of two columns in the results record of the table in AggreGate IoT platform - iot

I’m a newbie in AggreGate IoT platform and I’m searched information in the documentation, but did not find the answer. I have table with many columns and I need to sum numbers in each column and add result in the last row. Please help me, I have no idea haw I can do it?

I found a solution, you have to use an expression:
addRecords(st("table",table("<<value1><I>><<value2>
<I>>",1,1,2,2)),evaluate(print({env/table},"
{value1}","+")),evaluate(print({env/table},"{value2}","+")))

Related

How to sum multiple columns using a single formula in Google Sheets?

The data that i have is in a 2D fashion
I want the output in this type of schema using a Single Formula!
I've tried PIVOT and SUMIF,SUMIFS,QUERY functions. But, Alas unable to figure out the same. Can anyone please help me with this
You can use SUMPRODUCT for this task.
Formula B12 dragged right and down:
=SUMPRODUCT($B$5:$I$8*($A$5:$A$8=$A12)*($B$3:$I$3=B$11))
Result:
Pay attention at all those $ when adapting to your ranges.
you can also try this single formula to create the summary table.
=LAMBDA(x,y,{{"",y};x,MAKEARRAY(COUNTA(x),COUNTA(y),LAMBDA(r,c,SUM(FILTER(FILTER(B3:I,B1:I1=INDEX(y,,c)),A3:A=INDEX(x,r)))))})(FILTER(A3:A,A3:A<>""),UNIQUE(FILTER(B1:I1,B1:I1<>""),1))

Simple frequency distribution chart or formula (Google Sheets)

Have used this forum to help solve a few spreadsheet issues in the past (so many thank for all the donated time and expertise).
Hoping the community can help with something that thought initially to be quite simple but I can't find the answer or solution anywhere.
I have a list of values and I want to create a frequency distribution list from this. I don't want to collect the data into ranges (i.e. histogram style) but I do need to know exactly how many instances there are of each value. Values in spreadsheet example below.
https://docs.google.com/spreadsheets/d/10gkP4DLA_k8yrbVdNEFmrDwKrg-B_t6BUkAmPNE2CpQ/edit#gid=0
I don't need the data presented in a graph but if a graph is the easiest way to collate this then that's fine as I will need to routinely do this calculation.
Many thanks.
db
A 'group by' query should do this:
=query(B3:B,"select B,count(B) where B is not null group by B label B 'Value'")

Inverse LOOKUP in google sheets to return column name

Good day,
I am currently sorting a storage unit, where various parts from samples are stored in multiple locations. The idea is to sort it. So I am creating a spreadsheet for each part. The columns will be the location and the rows are a list of the sample numbers of which the parts can be found in this location.
input:
A spreadsheet like this will exist for every part.
The idea is to have a final table, sorted by sample number, which has the parts in the columns. I want the cells to return where this part of this sample is stored:
desired output:
I tried various LOOKUP formulas but they do not return the column name.
Because this has to be accessible by multiple people, it has to be in google sheets.
This is an example file: https://docs.google.com/spreadsheets/d/1pUmTs0mLoZAdPc83pLXC75MCUF2P1SHDtEfYPEMohr4/edit?usp=sharing
I am super thankful for any help!
With the help of this website:
https://infoinspired.com/google-docs/spreadsheet/search-across-columns-and-return-the-header/
I found a solution. The idea is to use match functions for each column. For the example posted the code looks like this:
=ifs(isna(match(A2,'Part 1'!$A$1:$A$7,0))=FALSE,'Part 1'!$A$1,isna(match(A2,'Part 1'!$B$1:$B$7,0))=FALSE,'Part 1'!$B$1,isna(match(A2,'Part 1'!$C$1:$C$7,0))=FALSE,'Part 1'!$C$1,isna(match(A2,'Part 1'!$D$1:$D$7,0))=FALSE,'Part 1'!$D$1)
I know it is not pretty, but it works, as the number of columns is limited. The website also suggests a dynamic solution with a query function, but that only works when the cell left of the cell of interest has entries.
Thanks to everyone :-)

VLOOKUP keeps giving #N/A

I am using VLOOKUP to do some looking up and I have all the values right but it keeps giving me #N/A. Here is what I am doing:
I have a data in 2 columns, Column A has names and column B has ID. I have copy and pasted the some details further down the columns and that is what I am searching. It keeps giving me #N/A when the data it is search is the same data I pasted.
The formula I am using is as follows:
VLOOKUP(B10,A30:B46,1,FALSE)
Any ideas why this is doing it?
When I use TRUE instead it gives me a really wrong match. nowhere close
I found the answer therefore just updating it here.
You can get around the error by using INDEX and MATCH functions. Especially if it includes massive tables and multiple sheets.
I used the following to solve my issue and hope it helps others too.
=INDEX('Users activity volumes'!A7:A367,MATCH('MH Users'!B8,'Users activity volumes'!B7:B367,0))

Sum different unknown values from multiple tables in Google Spreadsheet

I'm having the following Issue and don't get the right formula. I don't even know, if it is possible.
I'm having three tables with different values. I want to calculate and sum up, which value appears how many times in all three tables. I don't really know the value when starting the process, so it should count the following: How often are which values shown in the tables.
Find a example of the problem here
so, the result should tell me, that overall, there are 3 values (a,b,c) and each value has a total quantity of 60.
Here, you'll find the result I'm looking for
I want to do that calculation with google spreadsheet, but I really don't get any solution.
Can somebody help? Thank you already in advance.
Try to use query function:
=QUERY({'Sheet1'!A1:B;'Sheet2'!A2:B;'Sheet3'!A2:B},"select Col2, sum(Col1) group by Col2")

Resources