Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional Dimension

Hi,

I have a question about enabling conditional dimension in qlikview.

I have year dimension that has value from 2010 until 2015,

I only want to show year 2013 until 2015, I've already try using enabling dimension in dimension tab and insert "Year>=2013 and Year<=2015" but it still show 2010 until 2015

condi.png

What expression i must input in that column ?

thanks

Really appreciate your help

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Then this may work:

     =Sum({$*<Year = {">=2013 <=2015"}>} Amount)


(intersection between section and current year)


Or this:


     =If(GetSelectedCount(Year) = 1,

          Sum(Amount),

          Sum({<Year = {">=2013 <=2015"}>} Amount)

     )

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

17 Replies
ecolomer
Master II
Master II

try with:

year >= 2013

qlikviewwizard
Master II
Master II

Hi lejours88 ,

Try Enrique advise.

Anonymous
Not applicable
Author

Hi, Enrique.

Unfortunately it still not working.

Do you have any idea ?

Thanks

Anonymous
Not applicable
Author

Hi Arjun

i've try Enrique idea but still not working ?

do you have any idea ?

jonathandienst
Partner - Champion III
Partner - Champion III

The conditional is to either display or hide the entire dimension. I think what you want is to limit the chart to 2013-2015. For this you can use a calculated dimension with a filter on the dimension, but usually the best way (performance wise) is to use a set expression on the chart expressions. Something like

     Sum({<Year = {">=2013 <=2015"}>} Amount)

Adjust to suit your specific requirements.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hi Jonathan,

I've try put it in the chart expression, but it doesn't meet my requirement, I can't select specific year. Because it always locked from 2013 and 2015 (always show data 2013 until 2015) When i choose 2013 it still show 2013 until 2015. So i want to try using conditinal dimension in dimension tab. Any idea ?

Kushal_Chawda

Create calculated dimension

aggr(if(Year>=2013,Year),Year)

jonathandienst
Partner - Champion III
Partner - Champion III

>> I can't select specific year.

Your original question was "I only want to show year 2013 until 2015".

So which years do you want to display? and how would you like it to react when you select 2013? Do you mean the two years prior to the selected year?

We can only answer the question you ask.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Hi Kush,

Thanks for your idea

But it will affect my loading time if i use calculated dimension.

Because i have many data and it will take long time.

Do you have another suggestion ?

Thanks in advance