Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Mini Chart Bug?

Please confirm what appears to be buggy behavior when using an if() statement in an expression rendered as a Mini Chart. I've attached a sample application. The expressions below render or don't render the mini-chart based on trivial differences in the if-condition.

With the first group, having sum() in the if-condition works but only() reduces the mini chart to one period.

Most baffling is the second group. With column(1) specified in the if-condition, the chart renders. With column(2), it does not. Columns 1 and 2 are the same.

The third group just shows that the optional else condition is required for the mini-chart to render. Not a big, but it took me a while to discover this.

The expressions.
=if(Not IsNull(sum(flag)), Sum({<period=>} value), 0) //works
=if(Not IsNull(only(flag)), Sum({<period=>} value), 0) //works unexpectedly

=if(Not IsNull(column(1)), Sum({<period=>}value), 0) //works
=if(Not IsNull(column(2)), Sum({<period=>}value), 0) //does not work

=if(Not IsNull(column(1)), Sum({<period=>}value), 0) //works
=if(Not IsNull(column(1)), Sum({<period=>}value)) //does not work

This is frustrating as I'm trying to write some expressions using the mini-chart expressions, but it's hard with the if-condition not working consistently.

Thoughts? Thank you.

2 Replies
Not applicable
Author

Anyone? Is it an issue worth raising with Qlik?

marcus_sommer

I'm not sure if there is anything what is unexpected - the expressions are differently and therefore their results, too. The best thing to check such things is to put the expression-parts into separate columns and then comparing it against the behind data if there are really unexpected results.

In your case I could imagine that you don't need this if and something like this would work:

Sum({<period=, flag = {">=0<=0"} >} value)

- Marcus