Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
dmoreno2605
New Contributor III

GetSelectedCount(dimension) How to handle this?

Hi everyone, i have the following dimension:

 

if($(vSemanaVSNoSemana)=1,Semana,
if($(vSemanaVSNoSemana)=2,date(FechaCorteSemana)))

NOTE: Semana = (week in spanish)

$(vSemanaVSNoSemana) is a variable that i control using the extension "Variable", it helps me get two views of the same info, example:

Capture.PNG2.PNG

Before you say it, i don't use alternative dimensions because the customer doesn't want the users to do anything beyond some clicks.

Now, that you understand my dimension, here is the thing, because of the rules in this app (customer's rules) i am not allow to select any kind of dates (month, date, year...) so what i do is that i have the following code in every chart:

If(GetSelectedCount(Mes)<>0,0,
if(GetSelectedCount(Fecha)<>0,0,
if(GetSelectedCount(Semana)<>0,0,
if(GetSelectedCount(Mes_ActivosInicio)<>0,0,
if(GetSelectedCount(Year_ActivosInicio)<>0,0,
if(GetSelectedCount(FechaNumericaUSA)<>0,0,
if(GetSelectedCount(FechaUSA)<>0,0,
if(GetSelectedCount(MesN_ActIni)<>0,0,
if(GetSelectedCount([Año])<>0,0,
if(GetSelectedCount(NumeroDiaSemana)<>0,0,
if(GetSelectedCount(FechaCorteSemana)<>0,0,
if(GetSelectedCount(MesN)<>0,0,
if(GetSelectedCount(HireDate)<>0,0,
if(GetSelectedCount(TermDate)<>0,0,
1))))))))))))))

 

This is supposed to block every chart when a date field is selected, the thing is that when i select week in the chart you saw, this handling is not working. i think it is because i have no real dimension or something, any ideas about how i can handle that dimension?

Thanks!

Labels (1)
2 Replies
MVP & Luminary
MVP & Luminary

Re: GetSelectedCount(dimension) How to handle this?

Instead of blocking on date selections, can you instead ignore those selections using a set expression?

-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com

dmoreno2605
New Contributor III

Re: GetSelectedCount(dimension) How to handle this?

I can but i should've do it everywhere, i was trying to avoid that