I can't sum just one month on column, i need sum month by month expenses
First of all I am not a programmer. I need to divide my expenses by month and by year, i hav it by yer, I have tried to use formulas but it is impossible for me it is like speaking in code.
I don't know how to insert the month in this simple sum
sum('4_Suppliers'['Order with supplier'.'Order date'].'suma de compras')
tnanks for your help
11 replies
-
I don't know how to insert the month after 'Order date'
-
Thank you for the help!
-
I did this, and nothing:
sum('4_Suppliers'['Order with supplier'.'Order date' >= 2021-03-01 and 2021-03-31 <=].'suma de compras')
-
Hi Julian -
If you want to do in between two dates then it should look like:
sum('4_Suppliers'['Order with supplier'.'Order date' >= 2021-03-01 and 'Order with supplier'.'Order date' <= 2021-03-31].'suma de compras')
For future thought, you may want to create a new formula field that just finds the month of the 'Order Date' field. So you would create a new formula field, call it MonthNum and put this in the formula:
month('Order date')
This will return the number 3 in your example. In the future you can do a search on MonthNum and you can find all March (3) records regardless of year.
Then this calls for making one for year as well, and we can do down the rabbit hole.
Let us know how it goes.
-
First of all thank you four your time!!
...sorry I wasn't able to make it, the corrected code didn´t do nothing.
I inserted the new filed MonthNum on invoice table 'Purchase Orders' , and also Ninox gave me a error, and i dont know how to fix it, I can send you the data base
Symbol expected: ")" at line 1, column 24
sum(('4_Suppliers' where MonthNum = 3).'suma de compras')
-
Well then the next step is for us to get a better understanding of your structure.
I'm guessing that '4_Suppliers' is a reference field in whatever table you are working in. The table '4_Suppliers' has another reference field to table 'Order with supplier'. The table 'Order with supplier' has a field called 'Order Date' that you are trying to use. Am I correct?
You can also email support@ninox.com and ask for access to the Webinar EN 2021 team and then you can upload the DB there.
I'm sorry to have jumped so quickly into other ways of doing dates when I don't have a good understanding of your structure. Looking back I may have over simplified things.
-
Thank you!!
-
You are correct on your questions.
I will write to the webinar Thank´s again.
-
Again, I have led you down the wrong path. Sorry for not catching this earlier. Please see the corrected code below:
sum('4_Suppliers'.'Order with supplier'['Order date' >= date(2021,03,01) and 'Order date' <= date(2021,03,31)].'suma de compras')
As you can see we didn't "step down" far enough. The first time we stopped at '4_Suppliers', but we needed to link to 'Order with supplier' before we can do our filtering.
Then you just can't use date numbers as Ninox doesn't know how to translate them. Ninox actually stores the date you see in Order date as a number. So one way around it is to use the date function to tell Ninox you want it convert 2021,03,01 into numerical value of March 1, 2021.
Let us know if this works.
-
I solved on other Table with your advice Thankyou Very much, this is what I used:
Now its very simple:
if MonthNum = 4 then 'Total Pedido' end
I
-
like I said; thank you for your time!!!
Content aside
- 3 yrs agoLast active
- 11Replies
- 509Views