Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Using Calculated Dimension for GetSelectedCount function

Hi Community,

I am trying to use GetSelectedCount to work for calculated dimension.

For example,

I can get it to work properly using dimension vDate,

however, if my filter is "=if(vDate>today()-14, vDate)", the GetSelectedCount will stop working. Is there anyway I can make it work?

I need it in order to prevent my table from going haywire as the expression I am using requires the vDate to be a particular value.

Regards,

MJ

Tags (1)
4 Replies
Not applicable

Re: Using Calculated Dimension for GetSelectedCount function

Anyone can help? I can't find a satisfying answer on the community search. Thanks!

techvarun
Valued Contributor II

Re: Using Calculated Dimension for GetSelectedCount function

is it possible to post your application here?

Not applicable

Re: Using Calculated Dimension for GetSelectedCount function

Hi I am using a cloud version which I can't get it over here.

Essentally, the filter panel is using the dimension: "=if(vDate>today()-14, vDate)",


whenever I click any value, the filter displayed will be "if(vDate>today()-14, vDate)= MM/DD/YY"


resulting in GetSelectedCount(vDate) not working.


Therefore I am trying to see what are the ways to get it working other than making it a dimension in the load script.

rittermd
Honored Contributor

Re: Using Calculated Dimension for GetSelectedCount function

I have run into a similar challenge.  I have a calculated Dimension that I created just to limit the number of years that are displayed in the filter and chart and want to ignore the values in my Set Analysis expression when they are selected.

It doesn't work. 

It would be nice if the new calculated dimension had a new field name that you could use. 

I don't think that you can get this to work as you are trying it.  The only thing that I can think of is to remove that expression from the Dimension if possible and calculate it somewhere else.  Then just reference that as the Dimension.  Then you are just using a single field or variable as the Dimension and it should work as expected.

Community Browser