Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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

tresesco
MVP
MVP

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..