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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Show last four values in bar chart

I have bar chart with week number in x-axis.

I want to show last for weeks data. so how can i have that under dimension limits. it doesn't have last.

Thank You

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Sum({<Week={'>=$(=Max(Week)-4) <=$(=Max(Week))'}>}Data)

PFA

View solution in original post

7 Replies
vikasmahajan

please attach some sample

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
jagan
Partner - Champion III
Partner - Champion III

Hi,

Check this links, hope it helps you.

Set Analysis for Rolling Periods

Set Analysis for certain Point in Time

Regards,

jagan.

HirisH_V7
Master
Master

Hi,

By this you can have a week view for last four weeks,

At Backend , In Your calendar pick your Date as,

Week(Date) as Week,

There by You an use this in the front end as dimension and you can pick largest or Smallest or First four in Dimension limits,

Or else in your Expression Your can write like this,

Sum( {<Date={">=$(=WeekStart(Max(Date), -3))<=$(=WeekStart(Max(Date)))"}>}Sales)

Bar Chart last four values.PNG

Hope this Helps,

PFA,

Regards,

HirisH

HirisH
anuradhaa
Partner - Creator II
Partner - Creator II
Author

no, i have data based on weeks. i want to know how to display latest 4 weeks.

say i have 20 weeks, as 1-20 in x-axsis and i want to show week#16-week#20 only

anuradhaa
Partner - Creator II
Partner - Creator II
Author

i need last four. but it's not there.

tresesco
MVP
MVP

Sum({<Week={'>=$(=Max(Week)-4) <=$(=Max(Week))'}>}Data)

PFA

HirisH_V7
Master
Master

Hi,

Check the chages in my post now.

HirisH