Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Sum of Revenue for a Month

I am trying to create an expression to display the sum of the revenue in a given month. I have succeeded in doing this for a year with the following expression: =sum( {$<Year = {$(=Only(Year))}>} Revenue )       What do I need to do to make this by month.

3 Replies
deepakk
Valued Contributor III

Sum of Revenue for a Month

hi,

Try using it in below way.

sum( {$<YearMonth = {$(=max(YearMonth))}>} Revenue )

where YearMonth is a field created in script as below

Year(Date) & num(Month(Date)),'00') as YearMonth

I hope this helps.

MVP & Luminary
MVP & Luminary

Re: Sum of Revenue for a Month

Hi,

Try this expression

=sum( {$<Year = {$(=Max(Year))}, Month = {$(=Max(Month))}>} Revenue )

Hope this helps you.

regards,

Jagan.

v_iyyappan
Valued Contributor

Re: Sum of Revenue for a Month

Hi,

     Use expression like this,

          = sum( {$<Year = {$(=Max(Year))}, MonthKey = {$(=Max(MonthKey))}>} Revenue )

Where  MonthKey in load script =(Month(Datafield) * 1)

Regards,

Iyyappan