Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
narender123
Specialist
Specialist

year,month issue?

Hi Team,

i have a problem .I want sum of customs value of Max(Year )  and Max(Month) without any selection on year and month.

But it is not working by default with any selection.It is only working  when i select the year then it takes the max(month)

of that year.

But i want it on without any selection on month and year.

expression i used is:

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

please see my attachment file.

Thanks.

Labels (1)
17 Replies
narender123
Specialist
Specialist
Author

Hi Borja.

If i want to calculete max(Day)-7

=sum({<YearMonth={$(=Max(YearMonth))},Day={$(=Max(Day)-7)}>}CUSTOMS_VALUE)

it is not working.What i have to do???

Not applicable

Is Day a full date (20130709) or just the day number (9)?

If there is no data you will see 0 but it doesn't mean it is worng (like @tresesco mentioned here).

You could try a similar approach by creating a field with the full date in an integer format (e.g. 20130709 for today) in the LOAD statement and then in the expression just use that field in Set Analysis.

tresB
Champion III
Champion III

I guess you have to use P() in the SET.

narender123
Specialist
Specialist
Author

My day is 9 .i can also place date like DD/MM/YYYY.

but not working

narender123
Specialist
Specialist
Author

Hi Tresesco.

Thanks.

What do you mean

?

Where to write?

Not applicable

I still think you shoul use a full date field in the Set Analysis instead of a Day field with just the day number. It will make things easier.

tresB
Champion III
Champion III

Can you please let me know if the output of the following expression is okay for you or not, may be i can try then in other method?

=Sum(If(InMonth(RECEIPT_DATE,vMaxDate,0),RECEIPT_DATE))

Where vMaxDate= Max(RECIEPT_DATE)

narender123
Specialist
Specialist
Author

Yes its working.Showing right values.