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

Switching between 2 different time dimensions

Hi everyone,

In our company, each record in the database has several time dimensions, each one reflecting a different phase of the transaction.

Currently I have one listbox containing one of these dates.

I'd like to allow my users to easily toggle between these date dimensions, and see how the data changes between each perspective.

Is there a way to allow toggling between dimensions while using the same charts, and ideally even use the same listbox which will display the chosen time dimension?

I hope this makes sense.

Thanks a lot,

Assaf

1 Solution

Accepted Solutions
MarcoWedel

Hi,

one example of this solution:

QlikCommunity_Thread_169289_Pic1.JPG

QlikCommunity_Thread_169289_Pic2.JPG

QlikCommunity_Thread_169289_Pic3.JPG

QlikCommunity_Thread_169289_Pic4.JPG

hope this helps

regards

Marco

View solution in original post

8 Replies
sunny_talwar

You can use a calculated dimension for your chart:

If(vTog = 0, TimeDim1, TimeDim2)

and you can use an expression for your list box as well

If(vTog = 0, TimeDim1, TimeDim2)

You will need to create a button with an action to toggle vTog between 0 and 1

I hope this helps.

Best,

Sunny

Anonymous
Not applicable
Author

A Calculated Dimension would work, but could be inefficient.

Instead you could have both dimensions in your chart and make them conditional dependent on your toggled variable.

Anonymous
Not applicable
Author

why would it be inefficient?

and also - how do you use that strategy when needing to switch between these dimensions in expressions?

Anonymous
Not applicable
Author

Because Calculated Dimensions are re-evaluated every time a user clicks anything.

sunny_talwar

I don't think you will need to make any changes to your expression if the expression itself doesn't need any change. So if you want to see Sum(Sales) by two dimensions (one at a time), you can use a calculated dimension or conditionally hide/show dimension and use just one expressions Sum(Sales). But in case you want to see Sum(Sales) with one dimension and Count(Sales) with another then you will need an if statement expression or two expression which hide/show conditionally.

There are a lot of options available, you just need to see what works best for you.

Best,

Sunny

MarcoWedel

Hi,

use a crosstable load to create a canonical date and derive a canonical date calendar from it. Doing so you will get a DateType field your users can use to switch between the different dates.

See also

Canonical Date

hope this helps

regards

Marco

MarcoWedel

Hi,

one example of this solution:

QlikCommunity_Thread_169289_Pic1.JPG

QlikCommunity_Thread_169289_Pic2.JPG

QlikCommunity_Thread_169289_Pic3.JPG

QlikCommunity_Thread_169289_Pic4.JPG

hope this helps

regards

Marco

Anonymous
Not applicable
Author

Thank you Marco for the detailed answer, this solves my problem!