Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Allow user to freely compare data stored in one unique table

Hello,

We are facing a situation that seems challenging to address, hopefully someone can point the right approach ?

Our data looks similar to (only one table in QV data model):

MonthProductProductValue
Jan 14Apple15
Jan 14Banana5
Feb 14Apple10
March 14Apple12
March 14Banana7

We want our users to be able to select any two "Month", and be presented with the comparison of the available product values.

For instance is user selects Jan 14 and March 14, to have an output similar to:

ProductJan 14March 14Delta
Apple1512-3
Banana57+2

Having the user select a Month value and show him the delta versus previous month is relatively easy, the trick there is to enable user to select any two Month.

Could not find a way to use set analysis, aggr() function or dimensions to produce this analysis, still maintain the expected layout.

Any hint, guidance, solution ?

should we re-work the data model to store Month values in different tables (don't feel like a sustainable solution, but...)?

Thanks !

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Use Alternate States. The steps are pretty easy:

  1. Define two states in Settings->Document Properties->General->Alternate States (button)
  2. Create two calendar list boxes. Assign the selection of each list box to a different state.
  3. Create a chart/table with two identical expressions, that each is being controlled by a different state.

See tab "Product Grouping" in the document in attachment. Press the green i button in the top right corner for an explanation.

Easy and elegant to implement.

Best,

Peter

View solution in original post

2 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Use Alternate States. The steps are pretty easy:

  1. Define two states in Settings->Document Properties->General->Alternate States (button)
  2. Create two calendar list boxes. Assign the selection of each list box to a different state.
  3. Create a chart/table with two identical expressions, that each is being controlled by a different state.

See tab "Product Grouping" in the document in attachment. Press the green i button in the top right corner for an explanation.

Easy and elegant to implement.

Best,

Peter

Not applicable
Author

Hello Peter,

That's excellent - thanks, worked like a charm.

Did not knew this new feature, pretty cool.

Have a great WE,

Romain