Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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
Contributor II

Re: Total costs for latest month

hi Sid_Smith,

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

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

Not applicable

Re: Total costs for latest month

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])

Re: Total costs for latest month

The attached data does not match your expression

Not applicable

Re: Total costs for latest month

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

Re: Total costs for latest month

Could you check the file?

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

Partner
Partner

Re: Total costs for latest month

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

Re: Total costs for latest month

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