Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hkg_qlik
Creator III
Creator 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.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

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

View solution in original post

6 Replies
swuehl
MVP
MVP

Maybe like

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

or a similar set expression in all aggregation functions.

hkg_qlik
Creator III
Creator III
Author

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:

johnw
Champion III
Champion III

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.

swuehl
MVP
MVP

Maybe like

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

johnw
Champion III
Champion III

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.

swuehl
MVP
MVP

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.