Forum Discussion
Dicko
4 years agoHelper II
Aggregate by date
I have two tables:
Products (sell date is type date)
| id | sell date | amount |
| 1 | 21 January 2021 | 1000 |
| 1 | 21 February 2021 | 1100 |
| 2 | 5 January 2021 | 2000 |
| 2 | 5 February 2021 | 2100 |
Targets (date is type date)
| date | amount |
| 1 January 2021 | 2500 |
| 1 February 2021 | 3500 |
I need to create a visual that shows the results against the targets. Something like
| month | target | result |
| January 2021 | 2500 | 3000 |
| February 2021 | 3500 | 3200 |
The products have different sell dates (for each product always on the same date of the month) and I need to aggregate by month.
How do I do this?
Thanks.
Dicko Seems like you could create a relationship between Targets and Products on Date fields. Then create a table visual using Date from Targets, Amount from Targets and SUM(Products[result]).
1 Reply
- Greg_DecklerCommunity Champion
Dicko Seems like you could create a relationship between Targets and Products on Date fields. Then create a table visual using Date from Targets, Amount from Targets and SUM(Products[result]).