Reputation: 159
I have this sample sheet
https://docs.google.com/spreadsheets/d/1-Zr1ij6KbKbL5IHrVYBNPWmWSWkntZz9amrNBInQY6c/edit?usp=sharing
What I need is count the number of clients from both tab "V" and tab "Ventas" of date : Today, Yesterday, Last 30 days, This month, Last Month, This month last year
I need the result in Tab "Stats"
any help on this, please?
Upvotes: 0
Views: 34
Reputation: 1
D4:
=COUNTA(IFERROR(UNIQUE(FILTER({V!B4:B;Ventas!B4:B}, {V!A4:A;Ventas!A4:A}=TODAY()))))
D5:
=COUNTA(IFERROR(UNIQUE(FILTER({V!B4:B;Ventas!B4:B}, {V!A4:A;Ventas!A4:A}=TODAY()-1))))
D6:
=COUNTA(IFERROR(UNIQUE(FILTER({V!B4:B;Ventas!B4:B}, {V!A4:A;Ventas!A4:A}<=TODAY(),
{V!A4:A;Ventas!A4:A}>=TODAY()-30))))
D7:
=COUNTA(IFERROR(UNIQUE(FILTER({V!B4:B;Ventas!B4:B},
YEAR({V!A4:A;Ventas!A4:A})=YEAR(TODAY()),
MONTH({V!A4:A;Ventas!A4:A})=MONTH(TODAY())))))
D8:
=COUNTA(IFERROR(UNIQUE(FILTER({V!B4:B;Ventas!B4:B},
YEAR({V!A4:A;Ventas!A4:A})=YEAR(TODAY()),
MONTH({V!A4:A;Ventas!A4:A})=MONTH(TODAY())-1))))
D9:
=COUNTA(IFERROR(UNIQUE(FILTER({V!B4:B;Ventas!B4:B},
YEAR({V!A4:A;Ventas!A4:A})=YEAR(TODAY())-1,
MONTH({V!A4:A;Ventas!A4:A})=MONTH(TODAY())))))
Upvotes: 1