Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

sum gross

Hi!

this is the data is have :

month_salessales managergross
JanA100
JanB200
JanC100
FebA200
FebB300
FebC400

(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

3 Replies
Anil_Babu_Samineni

Expected o/p?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
effinty2112
Master
Master

Hi Namma,

Try:

=sum({$<month_sales = {$(=Month(Today()))}>}gross)

Cheers

Andrew

sunny_talwar

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)