Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
for example i have a calender box when i select particular date like 01-01-2021 I want show particular date sales count 1 and month sales count is 5
| date | Sales |
| 01-01-2021 | 10 |
| 02-01-2021 | 20 |
| 03-01-2021 | 30 |
| 04-01-2021 | 40 |
| 05-01-2021 | 50 |
| 01-02-2021 | 60 |
| 02-02-2021 | 70 |
| 03-02-2021 | 80 |
| 04-02-2021 | 90 |
| 05-02-2021 | 100 |
| 01-03-2021 | 110 |
| 02-03-2021 | 120 |
| 03-03-2021 | 130 |
| 04-03-2021 | 140 |
| 05-03-2021 | 150 |
load *,month(date#(date,'DD-MM-YYYY')) as month;
load * inline [
date Sales
01-01-2021 10
02-01-2021 20
03-01-2021 30
04-01-2021 40
05-01-2021 50
01-02-2021 60
02-02-2021 70
03-02-2021 80
04-02-2021 90
05-02-2021 100
01-03-2021 110
02-03-2021 120
03-03-2021 130
04-03-2021 140
05-03-2021 150
](delimiter is ' ') ;
for daily :count(Sales)
for monthly:aggr(count({<date=>}Sales),month)
when selecting a single date: day sales: count(Sales) -> it woul be more safe if you have somthing like a sales_ID.
for month sales try something like this:
count ( {1<date={">=Monthstart(date) <=Monthend(date)" }>} sales) //-> better sales_ID