Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to change the chart display through button object for 3,6,9 months?

Hello Everyone,

I am new to QlikView and require kind support in solving the below requirement.

I created a chart object with Month as dimension on X-axis and Sum(Sales) on Y-axis. I need to place three buttons in the document which would change the chart on button click.

On first button click it should display only first 3 months data in chart, similarly second should display 6 months and last button should display 9 months data. Please see the below image.

Image.jpg

Please let me know how this can be achieved.

Best Regards,

Vivek

1 Solution

Accepted Solutions
MarcoWedel

Hi,

possible solutions could be:

1. (horizontal) listbox using the Month field

2. (horizontal) listbox using a Month selector field inline loaded in the script

3. buttons using selection actions

QlikCommunity_Thread_165165_Pic1.JPG

QlikCommunity_Thread_165165_Pic2.JPG

QlikCommunity_Thread_165165_Pic3.JPG

QlikCommunity_Thread_165165_Pic5.JPG

QlikCommunity_Thread_165165_Pic4.JPG

tabSales:

LOAD RecNo() as Month,

    Money(100000+Ceil(Rand()*150000)) as Sales

AutoGenerate 12;

tabMonthSelect:

LOAD * INLINE [

    Month, MonthSelect

    1, 3 months

    2, 3 months

    3, 3 months

    1, 6 months

    2, 6 months

    3, 6 months

    4, 6 months

    5, 6 months

    6, 6 months

    1, 9 months

    2, 9 months

    3, 9 months

    4, 9 months

    5, 9 months

    6, 9 months

    7, 9 months

    8, 9 months

    9, 9 months

];

hope this helps

regards

Marco

View solution in original post

7 Replies
marcus_sommer

Which month? I believe you don't need buttons you and/or your user could simple use listboxex to select the wished periods - maybe extended by a field "quarter".

- Marcus

maxgro
MVP
MVP

or select the bar (3, 6, 9, months) in the chart

MarcoWedel

Hi,

possible solutions could be:

1. (horizontal) listbox using the Month field

2. (horizontal) listbox using a Month selector field inline loaded in the script

3. buttons using selection actions

QlikCommunity_Thread_165165_Pic1.JPG

QlikCommunity_Thread_165165_Pic2.JPG

QlikCommunity_Thread_165165_Pic3.JPG

QlikCommunity_Thread_165165_Pic5.JPG

QlikCommunity_Thread_165165_Pic4.JPG

tabSales:

LOAD RecNo() as Month,

    Money(100000+Ceil(Rand()*150000)) as Sales

AutoGenerate 12;

tabMonthSelect:

LOAD * INLINE [

    Month, MonthSelect

    1, 3 months

    2, 3 months

    3, 3 months

    1, 6 months

    2, 6 months

    3, 6 months

    4, 6 months

    5, 6 months

    6, 6 months

    1, 9 months

    2, 9 months

    3, 9 months

    4, 9 months

    5, 9 months

    6, 9 months

    7, 9 months

    8, 9 months

    9, 9 months

];

hope this helps

regards

Marco

anlonghi2
Creator II
Creator II

Hi Vivek,

please look at attached app.

I used:

a vriable (v_period)

the property "Restrict wich values are displayed..." setting show only "First" and using v_period as Values

I have few dates so I set my buttons to show 1, 2 or 3 months, but you can change action settings for each button

Let me know if it's what you are looking for.

Best regards

Andrea

Anonymous
Not applicable
Author

Thank you so much sir for giving 3 different solutions. I practiced all three methods and got the result.

MarcoWedel

Glad I could help.

please close your thread if your question is answered.

thanks

regards

Marco

Anonymous
Not applicable
Author

Thanks for your reply. I will try your suggested method as well.