Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
rajeshlingutla1
Creator
Creator

How to select last 8 weeks default as dimension

Hi ,

I have week field it contains weeks till 35 (like 1,2,....35),but now i am displaying week as dimension and sum(sales) as measure.

i want restrict only for last 8 weeks always.How can i define in bar chart .

Thanks,

Kanna

2 Replies
Anil_Babu_Samineni

Try this?

Sum({<Week = {">=$(=Max(Week-8)) <=$(=Max(Week))"}>} Sales)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
vinieme12
Champion II
Champion II

Create a numeric Week field if you don't have already and use the numeric value to restrict last 8 weeks in set expression


=Sum({<Week = {">=$(=Max(Week)-8)"}>} Sales)


or


=Sum({<Week = {">=$(=Max(TOTAL Week)-8)"}>} Sales)