Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
this is the data is have :
month_sales | sales manager | gross |
Jan | A | 100 |
Jan | B | 200 |
Jan | C | 100 |
Feb | A | 200 |
Feb | B | 300 |
Feb | C | 400 |
(for every month and every sales manager, his gross)
and I would like to have an expression that shows the sum of current month total gross.
this works when I select the current month. but if I make no selection then the value is 0..
=sum(if(date(today(),'MMM')=(month_sales), gross,0))
thank you all
Expected o/p?
Hi Namma,
Try:
=sum({$<month_sales = {$(=Month(Today()))}>}gross)
Cheers
Andrew
I would suggest creating a MonthYear field in your script
LOAD DateField,
Date(MonthStart(DateField)) as MonthYear,
Month(DateField) as Month
FROM/Resident ...;
and then may be something like this:
=Sum({<MonthYear = {"$(=Date(MonthStart(Today())))"}>} gross)