Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

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

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

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

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.

Contributor III
Contributor III

why would it be inefficient?

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

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

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

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

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

Contributor III
Contributor III

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