Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist II
Specialist II

regarding lenth function in set analysis

Hi,

I want to write a set analysis expression based on length of field . I have fields Year,Period,Number and Amount. Now Number contains Blank values also which is not a null value but lenght is 6. So i want the Total Amount without the blank value. So i have written the expression like,

sum({ <Year={$(#=max(@_Year))}>} Amount) -sum({ <Year={$(#=max(@_Year))},len(Number)={6}>} Amount)

But it is giving error in expression at len(Number) function.



Ans also i have 1-12 period for which i have to calculate current year and current period. Here no date field is there. How can i calulate the latest year and latest period??????

I am using max(Year) and it gives the correct answer but unfortunately max(Period) is giving the 12 number period of previous year. Can anyone help me????????



1 Solution

Accepted Solutions
Highlighted
Master
Master

regarding lenth function in set analysis

I don't think you can use anything other than field names on the left side of the = signs when defining your set analysis sets.

Len(Number) is in other words not allowed but you should be able to calculate this on the script side: Len(Number) as Len_Number and use this field in defining your set. I didn't look through the other stuff so I'm not sure if there was anything else to take into consideration.

View solution in original post

2 Replies
Highlighted
Specialist II
Specialist II

regarding lenth function in set analysis

Also i want rename the Blank value as Others in Number field. Can anyone help me?????

Highlighted
Master
Master

regarding lenth function in set analysis

I don't think you can use anything other than field names on the left side of the = signs when defining your set analysis sets.

Len(Number) is in other words not allowed but you should be able to calculate this on the script side: Len(Number) as Len_Number and use this field in defining your set. I didn't look through the other stuff so I'm not sure if there was anything else to take into consideration.

View solution in original post