Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am in the process of trying to build a chart which shows values for a customer against the market average. Due to data confidentiality, the market average can only be filtered by one dimension (in this case "Class Of Business"), so what I would like to be able to do is hide the market average expression if the data is filtered on any dimension other than "Class Of Business".
Unfortunately I can't think of a way to achieve this. Has anyone got any ideas?
Hopefully I've been clear in what I want to achieve.
Hi,
Try aggr("ur expression", "dimension")
Aggr(market average, Class of Business)
Hope it will help u.
Thanks, but unfortunately that hasn't worked.
What I didn't mention was that this is a trend chart, with the expressions spread over a time period (in this case year and month). With the Aggr function added, I lose market average values for certain months, and filtering the data on anything other than Class Of Business isn't hiding the expression.
Hello,
In your expression, you can use the set analysis like this :
{1<[Class Of Business]=$::[Class Of Business]>}
For example :
sum({1<[Class Of Business]=$::[Class Of Business]>} [Another field])
Amand Dupretz
Again, thanks for your assistance, but I'm getting a syntax error with this.
Can you describe your problem please ?
Where is the syntax error ?
Amand Dupretz
Please see the attached image. I am developing in Qlikview 10, SR1 by the way.
If you're using QV10 then you can't use the alternate states syntax in your set expressions. You're also missing conditional display options for expressions. So probably the only course of action is to use two charts and show one chart if there are no selections in Class Of Business and hide the other. And reverse that when there are selections in Class Of Business.
Thanks. I was already coming around to this way of thinking, but was there was an alternative solution.
Thanks to everyone for their assistance though.
Sorry, I've gone and stumped myself again.
So I want to show a chart if NO selections have been made or it ONLY Class Of Business has been selected. Any other combination of field selections should result in hiding the "Market Average" chart.