Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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?

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)