Help between Notion users

It's free & easy

Receive points, vote and give the solution

0vote

# Is it possible to sum every entry's number property with the same day and make a list of the numbers per day?

I have 2 databases, TradingDB and Accounts witch are related.
In the TradingDB I have property's:
Clossing Time (date property with date and time)
Profit (Number property with eur format)

I want to make a formula in the Accounts database witch gives me a list of every unique Closing Time (day!) Profit.

So it should sum every entry's profit with the same day (in Closing Time property) and make a list of the profits.

Is this possible?

``````prop("Trading DB").map(current.prop("⏰CLOSE TIME").formatDate("YYYY-MM-DD")).unique().map(
lets(
current,
),
)
)``````

I have this so far but this gives only 1 entry of that day and not all entry's summed for each day.

Kind regards
TommyFFX

0vote

### TommyFFX commented Dec 1, 2023

``````lets(
current.prop("Profit")).sum()
+ " ," +
current.prop("Profit")).sum()
+ " ," +
current.prop("Profit")).sum()
+ " ," +
current.prop("Profit")).sum()
+ " ," +
current.prop("Profit")).sum()
+ " ," +
current.prop("Profit")).sum()
)``````

Now I get my list but this not ideal because for every new day I need to make the formule larger, there must be another way..

Kind regards

0vote

### TommyFFX commented Dec 1, 2023

The reason I want to have this formula is for making this consistency formula:

(1 – (absolute value of the most profitable or losing day / absolute result of all trading days)) x 100

So I had this first but it was not right because it's was calculated on each profit and not profit/day

``````let(
ConsistencyScore,
/
)) * 100,
ConsistencyScore
)``````

1vote

TommyFFX Points300

SOLVED !!!!

``````lets(
dailyProfits,
lets(
currentDate, current,
dailyProfit
)
),
dailyProfits
)``````

0vote

### polle commented Dec 2, 2023

Thank you for sharing the solution!

...