Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
There is a possibility to change the maximum number of columns in a bar chart (see image below).
I have a bar chart which is a drill down-chart (hierarchy-dimension). First dimension is month. If i select maximum number = 12, then the bar chart will stretch and use all the space.
However if I click on month, the chart will drill down to date. Then only 12 dates are shown.
If I select automatic in number of axis value, the month view will not be strectched and only uses 2/3 of the diagram making it look quite funny.
Is there a way to make maximum values more dynamic with an expression - so in month view, it will use 12 and in date view it will be 31?
Kind regards, Jonathan
Kind regards
since it's a drilldown, GetSelectedCount() will work
=if(GetSelectedCount(Month),31,12)
Use GetObjectDimension() as below to check which dimension is being used
=if(getobjectdimension(0)='Month',12
,if(getobjectdimension(0)='Date',31,ELSEValue) )
Hi,
It looks like it should work. If i put the expression in a table it computes perfectly, but when I put it in the line chart it only falls back on 3 (only three dimensions in line chart.
See image below. Am I doing something wrong here that is obvious to you?
Kind regards, Jonathan
Regarding to the help this function couldn't be applied within all chart-parts and I assume the maximum number belonged to the not supported ones: GetObjectDimension - chart function | Qlik Cloud Help
Without supporting the function within the various meta-data areas of a chart and the earlier in QlikView working second parameter (Object-ID to call the function from the outside of the object) and also not supporting features like getcurrentfield() it seems not be possible - at least not with the standard dimension-groups.
since it's a drilldown, GetSelectedCount() will work
=if(GetSelectedCount(Month),31,12)
Thanks, works like a charm
Kind regards, Jonathan