Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Partner - Specialist III
Partner - Specialist III

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.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

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

Hope this helps you.

regards,

Jagan.

v_iyyappan
Specialist
Specialist

Hi,

     Use expression like this,

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

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

Regards,

Iyyappan