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

Implementing floor conditon to datefield in set expression

hi guys,

floor(AddYears(max(DateNum),-1))-floor(AddYears(min(DateNum),-1))+1

i want to implement the above condition in set expression...

=sum({<Salesfy={$(=max(Salesfy)-1)},Datenum={"$(=floor(AddYears(max(DateNum),-1))-floor(AddYears(min(DateNum),-1))+1)   "}>}GROSSWEIGHT)

please correct above expression

i just writing this expression to previous year salesGrossweight for the selected dates in the current year

5 Replies
tresesco
MVP
MVP

What is the issue you are facing? Could you explain and share your sample qvw?

Not applicable
Author

I want to see the previous selected days count

Can you please correct the set expression which given in above

tresesco
MVP
MVP

Your expression at first look seems to be right in syntax. But that assurance alone perhaps doesn't help you much. I guess, you have to explain it a bit more in details. Providing a sample to work on is a great help for people who want to help you here.

PrashantSangle

Hi,

looks like your expression is correct. issue with DateNum field

just confirm that you are rounding DateNum field in setAnalysis

floor(AddYears(max(DateNum),-1))

and your compare field Datenum is not rounded so you are not getting correct result.

for example

11 is not equal to 11.2

Also check qlikview is case sensitive therefore Datenum and DateNum is same field or not

Kind Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Not applicable
Author

sorry small mistake i did let me try once...

thank you