Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sspe
Creator II
Creator II

Leaving out one List box when using Alternate State

Hi,

Can anyone tell how to leave out only one specific selection when using Alternate States?

I have a document with approx 10 list boxes and I'd like to make a graph showing Units by Invoiced Month and then another graph showing units by Shipped Month. I have made a new State and added my Shipped Month graph to this State. Rather than then having to specify every list box/selection that it should include in the set for this State, it would be easier just so say that it should look at all selections except the Invoiced Date selection.

I assume it's possible (and most likely quite simple) but I haven't been able to find the syntax for it.

Regards

Steen

5 Replies
Josh_Good
Employee
Employee

Don't set the chart to the state rather use the states in the expression.  In your case the following should work:

Sum({$<OrderDate = State1::OrderDate>} Sales)

This expression will use the global selections for all fields except OrderDate.  For Order Date it will use the selection in State1.

Be careful about what other selections the users could be selecting on when using dates.  For example with this expression if the users selected an OrderYear in the default state and then selected an OrderDate in State1 you may get unintended results.  To deal with that you may want to consider specifically removing selections on other date fields.  e.g.:

Sum({$<OrderDate = State1::OrderDate, OrderYear =, OrderMonth= >} Sales)

sspe
Creator II
Creator II
Author

Hi Josh,

Thanks for the input - it helped me a little further but I'm still struggling with it...:-).

It's actuall not a graph I'm using but a Pivot table. I then have my Months as columns and the Invoiced Qty and Shipped Qty as rows. Currently the Months columns is coming from my Invoiced Date dimension.

I'd then like to have an expression giving me the Invoiced Qty per month and this seems to be working fine. Right now this is simply "sum(InvoicedQty).

My second expression is then Shipped Quantity and here it's a different date dimension I'll have to use. I have tried to make is as "sum({$<D_YearMonth = >} ShippedQuantity) " , which just takes everything except the Date for the Invoiced units. If I do this in a seperate Pivot table where the Date dimension is my Shipped Date, then  it looks ok.

My problem is then to do both expressions in the same Pivot Table. I have tried to make an expression like this - "

sum({$<[ShippedYearMonth] ={"$(=D_YearMonth)"},D_YearMonth = >} ConsignmentQuantity) " where I try to leave out the Date for the Invoiced qty but at the same time try to set my Shipped Date dimension to the same value as the one for my Invoiced Date.

I'm still new to Qlikview and struggling to find my way around the syntax, so I don't know if this is possible at all - or if there are others and better ways of doing it?

Regards

Steeen


sujeetsingh
Master III
Master III

Can you give a sample

Josh_Good
Employee
Employee

Hi Steen,

To do this you will need to is create an alternate calendar in a data island and use that as your dimension.  You will then need to have the expression reference the data island.  This is tricky to do and will reduce the flexibility of your app.  Sorry I can't think of how to do this off the top of my head.

I would encourage you to consider creating two different charts.  If you do this you will be able to ask more complex questions of the data.

-Josh

sspe
Creator II
Creator II
Author

Hi Josh,

Thanks for your input. I have got it working with a seperate graph/Pivottable so I think that's what I do for now. Then I might look a bit more into combining it into one table at a later stage.

Regards

Steen