Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Manoj_my
Partner - Contributor
Partner - Contributor

DYNAMIC METRICS

Hello Experts –

 

I am trying to create a dashboard as shown in the picture below and request your guidance/assistance

 

  1. User can select any one department from the drop down – Ex : Sales
  2. The charts must update and show the Metrics related to SALES
  3. Likewise if HR is selected the graphs must update to show HR related metrics
  4. We are ideally looking to have the metrics and their calculations in a table so that any changes can be easily maintained
  5. Am fairly aware of an inline concept but that only works if you have a single metric for a Dept and not sure how to modify if a Dept has multiple metrics

 

Any guidance or help is much appreciated

 

Thanks

Manoj_my_0-1612266142889.png

 

Labels (1)
1 Solution

Accepted Solutions
edwin
Master II
Master II

there are multiple ways of doing this and each with its own level of elegance.  

one is to create multiple charts and enable disable each based on the dimension (dept)
other is as i said using trellis - but trellis is dependent on the existence of a dimension that is linked to your metrics.  you can of course create that dimension and there are multiple ways of doing that too, i prefer to create the metric list in my load script, others can move that to the chart itself using valuelists.

take a look at this where i created a "metric" dimension. then in my expression i specified the calculation per "metric" dimension which i think applies to your case.  you can also create a table where the metric is associated with a variable name and the calculation is defined in the variable - that would be cleaner but will take more effort

View solution in original post

4 Replies
edwin
Master II
Master II

what you are looking for is a trellis chart

Assuming you have Value and Target as separate fields and you have a Metric Field:

create a bar chart with sum(actual) and sum(budget) as separate expressions

enable trellis

add Metric (assumed as a separate field) as dimension:

edwin_0-1612293576884.pngedwin_1-1612293599357.png

 

Manoj_my
Partner - Contributor
Partner - Contributor
Author

Hello Edwin - Thank you for the thoughts ...will explore Trellis 

Trellis may not work out as we do not have METRIC as part of the data model / data set and as such data needs to be aggregated/ calculated to derive the metrics

edwin
Master II
Master II

there are multiple ways of doing this and each with its own level of elegance.  

one is to create multiple charts and enable disable each based on the dimension (dept)
other is as i said using trellis - but trellis is dependent on the existence of a dimension that is linked to your metrics.  you can of course create that dimension and there are multiple ways of doing that too, i prefer to create the metric list in my load script, others can move that to the chart itself using valuelists.

take a look at this where i created a "metric" dimension. then in my expression i specified the calculation per "metric" dimension which i think applies to your case.  you can also create a table where the metric is associated with a variable name and the calculation is defined in the variable - that would be cleaner but will take more effort

Manoj_my
Partner - Contributor
Partner - Contributor
Author

This is great am certainly walking away with the Trellis concept you shared 

For my current task ..I explored the attached solution - Please let me know your thoughts feedback too 

I have a config table as attached  with the expression used in the charts which has the Metrics formula and the DEPT links back to my main data set 

 

If Sales has 5 charts i would just have 5 expression and simply increment from 1 to 5 in the expression and so on for each DEPT and still use conditional hide of individual charts 

With this set up i can easily change which chart should hold what metric and so on 

Again many thanks for the guidance and ideas shared - really valuable and informative 

 

Thank you 

Manoj