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: 
Not applicable

Charting / Calculations Based on Fields Specified in Lookup Table

Warning! Danger Will Robinson.  I am not a developer. I don't even play one on TV.

I am trying to create a simple dashboard for a series of metrics that we look at regarding our storage space.  

We have a large number of metrics which are really just simple ratios and rather than clutter the screen with ever permutation, I would rather we have one nicely formated dashboard where the user can select which ratio they are interested in exploring.

To that end, I created a table which includes a list of metrics and the field names that would belong in the numerator or denominator when this metric is selected.

Metric     Numerator     Denominator

M1          Field_A         Field_B

M2          Field_A         Field_C

M3          Field_C         Field_D

What I would like is for the user to select a metric from the list and then have the charts use the appropriate fields.  So, if a user selected M2, certain charts would be based off of Field_A, other charts would be based off of Field_C and finally some charts would be based off of Field_A and Field_C.

In my example, the metrics have to do with how much storage we have in use and/or we have available in our environment.  The data is, of course, extremely made up for this example.  I created a series of charts as I would like them with one of the numerator / denominator combinations but it doesn't currently change when a selection is made.

In another example, I used a bunch of if/then/else branching to accomplish this goal but I want the number of metrics to be dynamic.

Thank you for your help!

1 Solution

Accepted Solutions
fosuzuki
Partner - Specialist III
Partner - Specialist III

Your formula could be something like this:

SUM ($(=only(METRIC_NUMERATOR)))

/

SUM ($(=only(METRIC_DENOMINATOR)))

The dollar sign expansion will be replaced with the text in the respective field.

Hope this helps

Fernando

View solution in original post

2 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

Your formula could be something like this:

SUM ($(=only(METRIC_NUMERATOR)))

/

SUM ($(=only(METRIC_DENOMINATOR)))

The dollar sign expansion will be replaced with the text in the respective field.

Hope this helps

Fernando

Not applicable
Author

Thank you!

I feel like I have a new super-power.  This is exactly what I needed.  I updated my demo file so that anyone looking to do something similar would have it to start with ....

Thanks

PeggySue