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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Nethu_Rajapaksha
Contributor II
Contributor II

How do I visualize only 5 weeks in X axis? But when maximize(Full screen) the chart wanna see all the weeks.

I have created a line chart to calculate efficiencies of different departments. But I only want to see the latest 5 weeks(e.g. : W18, W19, W20, W21, W22) in the X axis. But when I maximize the chart I want to see all the X axis weeks from W14 to W22. How do I visualize this in Qlik sense?  I would appreciate if you could help me.

Capture2.JPG

Here are the expressions I used:

//Week:

=[Date.autoCalendar.Week]

 

//Department:

=if([Team Type]='Laying', 'Laying',
if([Team Type]='Cutting','Lectra',
if([Team Type]='Laser Cutting','Laser Cutting',
if([Team Type]='Pad Printing','Pad Printing',
if([Team Type]='Pre Shape','Pre Shape',
if([Team Type]='Pattern Sewing','Pattern Sewing',
if([Team Type]='Bierrebi','Bierrebi',
if([Team Type]='Band Knife','Band Knife'))))))))

 

//Efficiency:

Sum({<[Team Type]={'Laying','Cutting','Laser Cutting','Pad Printing','Pre Shape','Pattern Sewing','Bierrebi','Band Knife'}>} [Production Minutes])/Sum({<[Team Type]={'Laying','Cutting','Laser Cutting','Pad Printing','Pre Shape','Pattern Sewing','Bierrebi','Band Knife'}>} [Factory Work Minutes])

Labels (6)
1 Solution

Accepted Solutions
Sayed_Mannan
Creator II
Creator II

Hi, 

To visualize only the latest 5 weeks on the X-axis in your Qlik Sense line chart, you can use a calculated dimension.

Here's how you can do it:

1. Go to the properties panel of your chart.
2. In the Dimensions tab, click on `Add` > `Calculated Dimension`.
3. Enter the following expression:

=If(Week >= Max(total Week)-4 and Week <= Max(total Week), Week)

This expression will filter out the weeks that are not within the latest 5 weeks.

To see all the weeks when you maximize the chart, you can create a separate chart with all the weeks on the X-axis. Unfortunately, Qlik Sense does not provide a built-in feature to dynamically change the X-axis based on the chart size.

Remember to replace `Week` in the expression with your week field `[Date.autoCalendar.Week]`.

I hope this helps! Let me know if you have any other questions.

 

View solution in original post

2 Replies
Sayed_Mannan
Creator II
Creator II

Hi, 

To visualize only the latest 5 weeks on the X-axis in your Qlik Sense line chart, you can use a calculated dimension.

Here's how you can do it:

1. Go to the properties panel of your chart.
2. In the Dimensions tab, click on `Add` > `Calculated Dimension`.
3. Enter the following expression:

=If(Week >= Max(total Week)-4 and Week <= Max(total Week), Week)

This expression will filter out the weeks that are not within the latest 5 weeks.

To see all the weeks when you maximize the chart, you can create a separate chart with all the weeks on the X-axis. Unfortunately, Qlik Sense does not provide a built-in feature to dynamically change the X-axis based on the chart size.

Remember to replace `Week` in the expression with your week field `[Date.autoCalendar.Week]`.

I hope this helps! Let me know if you have any other questions.

 

Nethu_Rajapaksha
Contributor II
Contributor II
Author

@Sayed_Mannan Thank You.!