Hi, I am having some trouble using relations/rollup columns. I’m supposed to use those to sum month total and total by label, but I am not sure how.
This is what I have:
Date
User
Date2Num math column
Label
Amount
1/10/2025
User 1
Math date 2 number
Label 1
10
1/11/2015
User 1
Math date 2 number
Label 2
20
2/10/2025
User 1
Math date 2 number
Label 1
30
2/11/2025
User 2
Math date 2 number
Label 1
50
2/12/2025
User 2
Math date 2 number
Lable 2
70
So I created a math column that calculates date 2 number. That works OK. Now I am supposed to create a relations column, but to what?? And after that I should sum/rollup that relations column?
EDIT1:
By the way, I tried matching Label to Label column (which makes no sense, but I read somewhere that that is the way to go) but all I get are Users from column 2.
Use a query column if you are comparing more than one column. Creating a query linking the label to the row label and the math column to the row math column.
It makes sense because you are trying to find matching rows with the same label.
It doesn’t matter which column the relation randomly chose to show. Relations return rows. Not columns. What’s important is that it finds the matching rows you want.
OK, So when the relations column shows “User1, User2” it is showing all the rows that match the relations. How do I sum by date or label then using rollup? I am not comparing 2 column at the same time. Sum by month, and another would be sum by Label.
If there is no correlation between date and user, you can created separate relations for each and then create Rollup columns to sum amounts through those relations.
@ThinhDinh
Yes, that is correct. I was thinking of using this as a line chart (monthly sum) and bar chart (Labels on x axis), but it could be just a number to display somewhere in the app.
I managed to do a “if then” column to display only single month, and then “rollup” column for “if then” column. That seems way too many columns to display just a sum? I would need 24 for 12 months and another 20 for 10 labels. Is there a more efficient way?
Looking at this: Dynamically Filter your Data by TIMEFRAMES seems to be what I might need. And I think I found my fault, after relation column is created you get another “source” in the options which points to that relation. I was pointing to Table->RelationColumn instead of Relation->Amount