Sum up with condition

Hello community

I am working on machine production, 10 machines and daily record of total each work done

I want to sum up total pieces of machine 3 ( only this month) how can i do that

Can you please provide screen shots from the Data Editor of the tables involved?

It will be easier to describe the solution if we can see the tables and column names.

1 Like



Each row contain Product Name , Amount , Date stamp

What’s the column representing the machine in your screenshots?

The column Product = Machine
Amount = Total daily production
Date = Timestamp . everytime the new row is added

To obtain the total number of products: Create a relation column with the products themselves. Then add a rollup column directed to the relation and your Amount column to be summed.
Add a math column with the configuration ‘Month(Date)’ to get the month index. If you do not want the month in index form, use an ITE column to convert it.

I think you can continue from here.

1 Like




Really Thank You for the help , I am not good at this so please don’t be mad if i ask simple questions

  1. Pic 1 : I made relation column with products but not sure if Match mutiple needed or not
  2. Pic 2 : I rollup-Sum , got the result as Column E ( I think it’s correct)
  3. Pic 3 : Month Index ( i think ,it’s working now)
  4. From here i still confused how to get the total number of products with specific month , it semm it already added up all together in the table
    Sorry again for noob questions , i am not good at this

Yes, you are right. The rollup result is the total of similar products/machine. Now you just have to display it using the components you want.

Now do you want to display it dynamically, in the form of a selection of months, not just the current month? Here you need the choice component.

Oh , really thanks
Yes , I want to the user to choose machine number and the month they want to see . Could you please guide me how to do that ?

  1. I think when user choose date and machine no. on their screen , we can translate them to month index and compare with Month Index above ( not sure if i got the concept correctly or not)
  2. Problem is that i trying but user’s choses date only appear on first row ( I think we need them the entire column so we can compare them 1 by 1 on their row )

Yes.
If you want the display to be the name of the month, then you need to change it with the ITE column as I mentioned above.

To accommodate user choices, you need two USC columns (month and product selection). Then you change it to the single value column. This way you can match it to a whole row that has 2 conditions according to the user’s choice (month and product name).

1 Like