Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

hkg_qlik
Contributor III

Conditional X-axis display

Hi,

I would like to show only Jun-11, Jun-12, Jun-13.....Jun-16 (X-axis) for the below Line chart instead of showing ever Month-Year combination.

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Conditional X-axis display

Maybe like

=If([Month-Year] LIKE 'Jun*', [Month-Year], dual(' ', [Month-Year]) )

6 Replies
MVP
MVP

Re: Conditional X-axis display

Maybe like

=If([Month-Year] LIKE 'Jun*', [Month-Year])

or a similar set expression in all aggregation functions.

hkg_qlik
Contributor III

Re: Conditional X-axis display

Actually I want to keep all month-year data and just display June-11, June-12 .....June-16 on the X-Axis with all the data in between.

Something like this:

MVP
MVP

Re: Conditional X-axis display

Maybe a Month field in addition to your Month-Year field, and just have them select June if they want to see all Junes. If it's ALWAYS June that we want to see, then a conditional dimension or set analysis as swuehl says, but it's easier to do either if you have a Month field.

Edit: Sorry, posted before I saw your reply.

MVP
MVP

Re: Conditional X-axis display

Maybe like

=If([Month-Year] LIKE 'Jun*', [Month-Year], dual(' ', [Month-Year]) )

Highlighted
MVP
MVP

Re: Conditional X-axis display

Yep, that worked. Well, this, in one of my charts.

=if(month([Month])=6,[Month],dual(' ',[Month]))

But I'm confused HOW it worked. I thought dual could only assign a single numeric value to each text value, so expected this to confuse it.

Edit: I guess it's the other way around. You can only have one string representation for a given number, but you could have multiple numbers for the same string representation.

MVP
MVP

Re: Conditional X-axis display

Hi John, a dual value can store a single text value per numeric value and the numeric value is considered the key, so it's the other way round

But be assured (referring to your other comment), I need to repeat and / or lookup myself a lot of the basic stuff each single day...

And unfortunately, some things are hard to remember, due to inconsistencies or flaws.