Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Bar chart with class demension and class labels

Have a bar chart that want to show data group by week (starting date plus 7 for 4 weeks). Have it kind of working but want the X labels to read "Week 1", "Week 2", etc. currently labels are "40334 <= Week < 40341", etc. See attached screen shot.

1 Solution

Accepted Solutions
Highlighted
Not applicable

Bar chart with class demension and class labels

You can use this expression then as a calculated dimension in your chart:

='Week' & num(floor((RollupDate- min(total RollupDate)) / 7) + 1)


View solution in original post

5 Replies
Highlighted
Not applicable

Bar chart with class demension and class labels

You can create a calendar table where you can calculate weeks in any suitable way for you.

It can be something like this:


Calendar:
load RollupDate,
dual('Week' & week(RollupDate), week(RollupDate)) as WeekToYearName,
dual('Week' & ceil(day(RollupDate) / 7), ceil(day(RollupDate) / 7)) as WeekToMonthName
;
load distinct RollupDate
resident <your table>;


After that you can use WeekToYearName or WeekToMonthName field as a Dimension in your chart.

Highlighted
Not applicable

Bar chart with class demension and class labels

Thanks, but I don't think that will work for me. User of the chart is going to be able to select the starting date, so need to build the chart base on the starting data + 7 for 4 or 5 weeks.

Highlighted
Not applicable

Bar chart with class demension and class labels

You can use this expression then as a calculated dimension in your chart:

='Week' & num(floor((RollupDate- min(total RollupDate)) / 7) + 1)


View solution in original post

Highlighted
Not applicable

Bar chart with class demension and class labels

Thanks that did it.

Highlighted
MVP & Luminary
MVP & Luminary

Bar chart with class demension and class labels

Cool solution Nick!

-Rob