Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Set Y max based on which columns have values in X

I've got a bar chart that's aggregating the sum of values for people who fall into several categories--being able to see the sum for folks who don't fall into any category is important too.

However, the total for folks who don't fall into any category is so much larger than the other categories that the chart isn't particularly useful (see the screenshot below). I can set a static Y min fairly easily, but I'd like the chart to scale properly based on my selections--what I'd really like to do is set a static Y min based on the biggest value of Y where X is not null. I'm guessing I could use some sort of set analysis expression to do this, something like = max( aggr( sum( {< Xvalue = { isNotNull( Xvalue) } >} Yvalue ), Xvalue)), but I'm sure that's not exactly right.


Suggestions?

. qv chart.png

1 Solution

Accepted Solutions
Highlighted

Try this:

=Max({<Xvalue = {"=Len(Trim(Xvalue)) > 0"}>} Aggr(Sum(Yvalue), Xvalue))

View solution in original post

3 Replies
Highlighted

Try this:

=Max({<Xvalue = {"=Len(Trim(Xvalue)) > 0"}>} Aggr(Sum(Yvalue), Xvalue))

View solution in original post

Highlighted
Not applicable

That did it--thanks so much!

Highlighted

Looking at the issue again, you might have also resolved this by selecting 'Suppress When Value Is Null' on the dimension tab with this expression -> Sum(Yvalue) or Max(Aggr(Sum(Yvalue), Xvalue))