Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

kenr169387
New Contributor

Dynamic y-axis min on line chart

Using a line chart, I am aggregating the sum of a field by year and month with the option of filtering by location or showing all.  I have created an expression to adjust the y-axis minimum as necessary when fields are selected through other charts.  When nothing is selected my y-axis should start around 10,000.  When a field is selected the y-axis typically start at 1000, 500, or 0 depending on the minimum of my aggregation. 

My expression worked until the user came back and asked to see information found in another table.  I've joined these two tables together before without issue so I simply added the table to the script.  Everything looks fine except that the y-axis always = 0.  I removed the new table and the y-axis was dynamic again.  I tried to add various other tables but each time the y-axis would be 0.

I added the both the expression and variable (see below) as a measure and they displayed properly. 

I added the both the expression and variable as a reference line and they both read 0.

I converted the line chart to a table and they displayed properly.

My expression is:

floor($(vMin),pow(10,len(round($(vMin)))-1))

vMin = min(aggr(sum(MyField),Year, Month))

What could be causing the expression not to work when other tables are added? 

Thanks for the help

Community Browser