Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rbecher
MVP
MVP

scatter chart formula group description

Hello folks,

we have a scatter chart (with an underlaying map; formula x is long, y is lat) with a third formula z (the bubbles) that is a group of formulas (let's say there is revenue, costs and profit) where you can choose one by the displayed button. But, there is no way to display the choosed formula description. Neither on layout properties nor with a diagram function (for the header e.g.).

On QV 10 I would use a Container with multiple diagrams, but we're still on QV 9... [;)]

Any help will be appreciated!

- Ralf

Astrato.io Head of R&D
1 Solution

Accepted Solutions
johnw
Champion III
Champion III

I workaround I've used is to create a dimension group of the fields:

"Revenue"
"Cost"
"Profit"

Then just have ONE expression, but do it like this:

pick(match(getcurrentfield("My Group"),'Revenue','Cost','Profit')
,sum("Revenue")
,sum("Cost")
,sum("Revenue"-"Cost"))

Now you just need to get your dimension group onto your chart where you'd normally see the expression group or wherever else you want it. I think sometimes it works if you just add the dimension group as another dimension. But you can also create some other object that has absolutely no purpose except to display the dimension group. I can figure out how I've hacked it together if you can't work it out from there.

If I remember correctly, my dimension group object is usually NOTHING but the little circular icon. I position it in the chart title, and make the chart title =' ' & getcurrentfield("My Group"), left justified, with enough spaces to make room for the icon.

Edit: OK, I found one of my applications that does this. I created a bar chart with the group as the dimension, no expression, don't display the caption, and changed the "all expressions disabled" error message to blank. That leaves you with nothing but the little icon to select the "expression" for your chart. Shrink the size of the window to barely show the icon, put it on the top layer, and drop it anywhere on your chart that you want it.

View solution in original post

5 Replies
johnw
Champion III
Champion III

I workaround I've used is to create a dimension group of the fields:

"Revenue"
"Cost"
"Profit"

Then just have ONE expression, but do it like this:

pick(match(getcurrentfield("My Group"),'Revenue','Cost','Profit')
,sum("Revenue")
,sum("Cost")
,sum("Revenue"-"Cost"))

Now you just need to get your dimension group onto your chart where you'd normally see the expression group or wherever else you want it. I think sometimes it works if you just add the dimension group as another dimension. But you can also create some other object that has absolutely no purpose except to display the dimension group. I can figure out how I've hacked it together if you can't work it out from there.

If I remember correctly, my dimension group object is usually NOTHING but the little circular icon. I position it in the chart title, and make the chart title =' ' & getcurrentfield("My Group"), left justified, with enough spaces to make room for the icon.

Edit: OK, I found one of my applications that does this. I created a bar chart with the group as the dimension, no expression, don't display the caption, and changed the "all expressions disabled" error message to blank. That leaves you with nothing but the little icon to select the "expression" for your chart. Shrink the size of the window to barely show the icon, put it on the top layer, and drop it anywhere on your chart that you want it.

rbecher
MVP
MVP
Author

Very interesting approach for a small layout issue.

I'm afraid it will not help on a scatter chart because I need one dimension which is city, two expressions x, y for longitude and latitude and a third expression group with several expressions.

I played around with your suggestion but then I have a legend with many values and other problems. But, I need the caption of the expression only.

Astrato.io Head of R&D
johnw
Champion III
Champion III

Something like this?

rbecher
MVP
MVP
Author

This looks great! Now I got it... Thank you, John!

For what reason is the fourth expression (dual)?

Astrato.io Head of R&D
johnw
Champion III
Champion III

It turned out that the chart didn't want to display the legend for the fourth expression. To convince it to display the legend, I had to include it in the value by using dual(). I'm not sure if that made much sense, but if you REMOVE the dual(), and look at the pop up text, you should see the problem it's solving.