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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
diwakarnahata
Creator
Creator

Class Function Label

Hi All,

I have a class function which creates buckets of rolling 4 weekIDs (a sequence number). I want to label the bucket with the WeekName of the highest WeekID of the bucket. For e.g. In the below image, I want to show WeekName '04/05/2013' (of the highest WeekID of the bucket) instead of its bucket name '11 <= mth < 15'. How can I do that in QlikView?

QV_Class_Function_Label.jpg

I have used the the below expression to create buckets:

class(WeekID,13,'Qtr',vModQtr),'< ',2

Attached is the qvw for reference.

Thanks,

Diwakar

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try expression like:

=Date((SubField(class(WeekID,13,'qtr',vModQtr),'< ',2)-2)*7+vMinDate)

where vMinDate==Min({1}Date#(WeekName,'MM/DD/YYYY'))

PFA

View solution in original post

4 Replies
tresB
Champion III
Champion III

Try like:

SubField(class(WeekID,13,'Qtr',vModQtr),'< ',-1)

diwakarnahata
Creator
Creator
Author

Hi Tresesco,

I tried this, but it gives me the WeekID. How do i get the WeekName ?

Thanks,

Diwakar

tresB
Champion III
Champion III

Try expression like:

=Date((SubField(class(WeekID,13,'qtr',vModQtr),'< ',2)-2)*7+vMinDate)

where vMinDate==Min({1}Date#(WeekName,'MM/DD/YYYY'))

PFA

diwakarnahata
Creator
Creator
Author

Perfect!!! Thanks a ton..