Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Highlighted
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
Highlighted
MVP
MVP

Try like:

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

Highlighted
Creator
Creator

Hi Tresesco,

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

Thanks,

Diwakar

Highlighted
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

Highlighted
Creator
Creator

Perfect!!! Thanks a ton..