Tuesday 18 February 2014

User Defined Measurements


Let's imagine this is your situation; you go to a client meeting where there is an initial scoping session for a proposed QlikView dashboard solution. You quickly identify that the client has preconceptions of what is possible from a reporting perspective and so has defined his charts and visuals based on what he is aware of. You also gauge through follow-up sessions that each of the functional heads for the different LOB want to see something slightly different.

One of the hardest challenges when designing a dashboard is deciding what charts to use and the layout to address all of the stakeholders requirements. One feature that I really like is dollar-sign expansions $(=string/variable). With some careful planning in your script, you are now able to allow your users to define their charting based on their requirements. 


This is a 5 stage approach


1) Name and define expression variable in script







2) Create an INLINE LOAD with the variable name and alias this variable through another column




3) Create Input boxes that will house your variable list - My expression in the listed values selection is ','&concat(DISTINCT AgentMeasureName,','). I also created an input box that will house my dimensions that I want the user to aggregate by. The values are simply a delimited list i.e. Calendar Date;Calendar Week;Calendar Month;Calendar Week Day;Team Leader;Manager;Shift











4) Create a bar chart with a dimension and expression that allows for dynamic reporting















The dimension I used was the following: 












I like my users to see a narrative that is clean and easy to read, hence the string match and what dimension to use. What's very important is that the variable that contains the drop down be used to match against and pick the relevant field to act as the dimension

5) Expression






What's great about this expression is that it will dynamically select the expression you defined in your script based on the selections users make on the front-end. The FieldValue(FieldIndex()) returns a string that contains the script variable name i.e. vAgentCallsAnswered. Since this is defined in our let statement, using a dollar sign expansion = $(vAgentCallsAnswered) returns our expression i.e. num(sum(AgentCallsAnswered)). The next dollar sign expansion then forces this to calculate and thus render the chart with the correct output based on selections made.

This approach can have many uses. One of my other favourite is for comments. No longer do i need to have a separate tab with a show/hide event to populate comments as text boxes. I can now have 1 text box in my main sheet and call the comment based values chosen by the EU.

No comments:

Post a Comment