Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Dimension limits? Chart Condition?


Hi everyone,

I currently have a chart that has a drill down group, and if nothing is selected (filters not applied) it shows a tonne of different values and looks messy and complicated. I want when nothing is selected, for it to show current year and current month data simply for the sake of not scaring the user; when a number of months is selected I want it to show respective months' data. I tried using GetCurrentSelection, but im not sure how to tell it to show specific data that I want (as described above). Any idea how can I do that?

Thanks,

Anna

8 Replies
aadilmadarveet
Valued Contributor

Re: Dimension limits? Chart Condition?

Use something like below in the dimension.

IF(GetSelectedCount(Year) = 0 and GetSelectedCount(Month) = 0 and GetSelectedCount(Quarter) = 0 and GetSelectedCount(Date) = 0,

if(Year = $(CurrentYear),Month),Month)

use the "suppress when value is null" option to hide the null dimension.

or you can also look into modifying the expression using set analysis.

hope this helps.

Not applicable

Re: Dimension limits? Chart Condition?

Hi,

     you can do this using triggers also....

1. Go into document property >> Triggers >>Field Event Triggers >> select your field (which you want to select by default when there is no selection here I am selecting "Year" as a field)  >> Click on "add action" in "Select option" .

2. After that click on add button>> selection >> select in field.

3. in field type field name and in Search string write like this...

  

  =if(GetSelectedCount(Year) = 0, '(' & max(Year) & ')', Year)

4. Now whenever you clear your selection it will select max year.

hope this helps you.

Regards,

Ashutosh

Not applicable

Re: Dimension limits? Chart Condition?

Anna,

You can force also the selection. if nothing is selected, hide the graph(s).

You can also trigger an action when activating the sheet to select the current year

Fabrice

Not applicable

Re: Dimension limits? Chart Condition?

unfortunately, non of these worked..even if I select two months, my graphs only show data for one month, and in most cases simply sum all values which leads to percentages like 9,532%. Odd. Thanks for your advice though

Not applicable

Re: Dimension limits? Chart Condition?

unfortunately, non of these worked..even if I select two months, my graphs only show data for one month, and in most cases simply sum all values which leads to percentages like 9,532%. Odd. Thanks for your advice though

Not applicable

Re: Re: Dimension limits? Chart Condition?

Hi,

    Sorry for the late reply. Please check this file and let me know...

Thanks,

Ashutosh

Not applicable

Re: Re: Dimension limits? Chart Condition?

Hi Ashutosh,

Thanks for that, it helped. I also had an error in my expression which was giving out crazy results. On another note, if I have a bar chart, but for one of the dimensions within the chart I want to show it as a line, do you know how can I do that?

Thanks,

Anna

Not applicable

Re: Dimension limits? Chart Condition?

Hi,

     If you add two dimensions in chart then it will show result according to both dimension and if you change order of dimension using (Promote or Demote)  then result also should change according to order. I don't think so according to dimension this is possible. but if you will use combo chart and write two expression(For second expression remove tick from Bar Option and tick line option in the expression tab and use line then it will work but according to both dimension only) .

Hope this help you.

Ashutosh

Community Browser