Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total costs for latest month

Per attached file I want to show the monthly costs column ie the total for the latest month.

At the moment I have data for Jun - Dec 2014. So that column would need to show the data for latest month in this case December.

Thanks in advance

7 Replies
saurabh5
Creator II
Creator II

hi Sid_Smith,

you can do a set analysis and create an expression as:

=sum({<datefield={"=$(=max(month(datefield)))"}>}expenses)

Not applicable
Author

Unfortunately it's giving me a total aggregated amount for all months as opposed to just december. My expression is

=sum({<[Booking Date]={"=$(=max(month([Booking Date])))"}>}[Account Excl VAT])

robert_mika
Master III
Master III

The attached data does not match your expression

Not applicable
Author

So Booking Date is the date field and Account Excl VAT is the sales amount

robert_mika
Master III
Master III

Could you check the file?

And if you will attached another one is better to attached in Excel file.

manojkulkarni
Partner - Specialist II
Partner - Specialist II

Use 2 variables

setst_date=date(monthstart(Max(billDate)),'YYYY-MM-DD');

seten_date=date(monthend(Max(billDate)),'YYYY-MM-DD');

= sum({<bill_date={">=$(=st_date) <=$(=en_date)"}>}sales)

Not applicable
Author

Manoj - These expressions work - but again they give me an aggregated sales amount for all the months as opposed to just the latest month.