Comment faire une selection sans impacter l’affichage

0
98

On 22nd October 2014 I attended ‘Qlik View tips and tricks’, at Qlik’s Visualise your world conference 2014. The session covered some really useful functions so I thought I would share my top 3.

DEBUG SET ANALYSIS

Set analysis is the way of sub-setting the dataset from the existing dataset already loaded in Qlikview. It is one of the most powerful features of QlikView. However, debugging it can be a daunting task for developers. The best way to debug an already written syntax is by using single quotes and text object. Here’s how:

  • Create a new Text Object
  • Open the Edit expression window
  • Type in or Paste your set Analysis expression that you want to debug
  • Enclose your expression between single quotes

3.1

 

This will display the complete expression in the Text Object as below:

3.2

And the great thing is that as we make our selections in the dashboard the value within Quotes will also change, in this case PeriodID, helping to find out the actual values with which the expression is being populated while making selections.

BRUSHING

Whenever we make any selections in a Bar chart in QlikView, only the selected value gets highlighted and the rest gets ignored. For example in the screenshot below, as soon as the value is selected in the month List Box all other values are no longer available on the screen and only the selected value is displayed in the Bar Chart.

combined3.3.3.4

What if we want to display all bars in a BAR Chart and just highlight the one which is currently selected? This can be achieved using set analysis:

  • Right click on the properties of the chart
  • Go to Expressions tab
  • In the given bar chart Month is the dimension. Under the definition section, type “=sum({<Month = >}Sales)”. This step will make sure that irrespective of the selection, all the Bars within the Bar chart are displayed.
  • Finally we need to highlight the Bar with the selected value. In order to do that, under the Expressions Tab, expand your expression

3.5

  • Select ‘Background Colour’ and under Definition type “=if(Month = GetFieldSelections(Month), Green())”, this will highlight the current selected Bar with green colour as shown below.

3.6

WORKING WITH DATES

Working with dates is always an issue irrespective of the tool being used. And it becomes more problematic when the underlying data source stores dates as strings rather than actual dates. Fortunately Qlikview offers interpretation functions which can help us in these situations. The date#() interpretation function interprets a string as an actual date using the given format:

3.7

This converts the string into actual date format and you can then use other date functions as usual.

Overall attending this conference has been a great experience and I look forward to use these tips and tricks along with getting up to speed with Qlik Sense.

If you would like to share ideas and tips about QlikView, join our Qlik LinkedIn group.

LEAVE A REPLY

Please enter your comment!
Please enter your name here