Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save $300 before February 6: REGISTER NOW!
cancel
Showing results for 
Search instead for 
Did you mean: 
stephenedberkg
Creator II
Creator II

Bar chart limit

i have 24 months in barchart.

but want to show last 12 months only

how to limit the dimension?

PFA

23 Replies
stephenedberkg
Creator II
Creator II
Author

if i selected the Week 15 mean i have the 24 weeks

but 1 st 12 weeks are history weeks last 12 weeks are forecast weeks

i want to show the last 12 weeks only

my expression is

=num(sum({<Year_UP = {$(=Max(Year_UP))},Week_UP={$(=Max(Week_UP))}>}Sales),0.00)

ecolomer
Master II
Master II

See this example

balrajahlawat
Champion
Champion

did you check what I shared with you?

Digvijay_Singh

Not sure but in your question you had mentioned 12 months, if you want last 12 weeks, and I can see you have week field in your model, did you try this -

=num(sum({<Year_UP = {$(=Max(Year_UP))},Week_UP={">=$(=Max(Week_UP)-12)"}>}Sales),0.00)

stephenedberkg
Creator II
Creator II
Author

i don't want to modify the expression

i want to change the dimension limit

amit_saini
Master III
Master III

Check:

Script:

Sample_Int:

LOAD * INLINE [

    Month, Sales

    Jan-09, 55

    Feb-09, 39

    Mar-09, 33

    Apr-09, 56

    May-09, 55

    Jun-09, 70

    Jul-09, 57

    Aug-09, 29

    Sep-09, 34

    Oct-09, 41

    Nov-09, 12

    Dec-09, 11

    Jan-10, 24

    Feb-10, 85

    Mar-10, 99

    Apr-10, 77

    May-10, 85

    Jun-10, 64

    Jul-10, 61

    Aug-10, 45

    Sep-10, 62

    Oct-10, 70

    Nov-10, 59

    Dec-10, 25

    Jan-11, 86

    Feb-11, 92

    Mar-11, 67

    Apr-11, 65

    May-11, 39

    Jun-11, 70

];

Sample:

   Load

       Date(Date(Date#(Month,'MMM-YY'),'DD-MM-YYYY'),'MMM-YY') as YearMonth,

       Sales

Resident Sample_Int;

Drop Table Sample_Int;

For bar chart :

Dimension : YearMonth

Expresii: Sum({<YearMonth ={">=$(=Date(addmonths(Max(YearMonth), -12), 'MMM-YY')) <=$(=Date(addmonths(Max(YearMonth), -1),  'MMM-YY'))"} >} Sales)

Thanks,

AS

stephenedberkg
Creator II
Creator II
Author

i have personal edition so i cant open the QVW files

stephenedberkg
Creator II
Creator II
Author

if i selected the Week 15 mean i have the 24 weeks

but 1 st 12 weeks are history weeks last 12 weeks are forecast weeks

i want to show the last 12 weeks only

my expression is

=num(sum({<Year_UP = {$(=Max(Year_UP))},Week_UP={$(=Max(Week_UP))}>}Sales),0.00)

tyagishaila
Specialist
Specialist

Sort your Dimension in descending order and then apply dimension limit

first 12.

or you can use

Presentation Tab--> Enable X-axis Scrollbar [12] ---> check Reversed

balrajahlawat
Champion
Champion

Through Dimension Limit I do not think you can fetch last 12 month data.

Dimension Limits are used when you want to show max or min value not for last 12 month Data.

I think Set Analysis is a better option for same