Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limit depth of a dimension into a graph

Hi All,

I'm currently facing an issue.

I've a graph with 3 dimension (date, week and month) named DimDate

I would like to limit the numbre of bar depending on the dimension.

As an exemple:

52 bars if DimDate='Week'

12 bars if DimDate='Month'

7 bars if DimDate='Date'

Any idée?

Thanks in advance

4 Replies
sbaldwin
Partner - Creator III
Partner - Creator III

I am guessing that your DimDate is a Group? if so you could use a function like this :

=if(GetCurrentField(DimDate)='Week',52,

if (GetCurrentField(DimDate)='Month',12,

if (GetCurrentField(DimDate)='Date',7,0)))

in your max number visable.

Thanks

Steve

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     You can place an expression in presentation tab at max value. You can tyep expression as

     =if(getCurrentField(DimDate) = 'Week',52,

        if(getCurrentField(DimDate) = 'Month',12,7))

     Hope this helps.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Many Thanks to you both,

the solution start to look like what I'm looking for, I just now need to find how to display the last: 12, 52 or 7 bars

Not applicable
Author

In fact I just have to apply the same principle to the static min value, I think

Or in the expression itself...