Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression works in QlikView 11, but does not work in Sense

Hello,

I'm trying to create an expression that count the Id of my fact table with 2 conditions. This expression works in QlikView 11, but does not work in QlikView Sense.

=count( {$< Año= { $(#=Only(Año-1)) }, TipoID = {'P1'} > } Id )

Any explanation ? I do wrong ?

Thank you very much,

Javier

1 Solution

Accepted Solutions
Colin-Albert

If the 3rd expression fails then try this in a text box to test if your Ano field is text not a number

= $(#=Maxstring([Año]-1))

View solution in original post

12 Replies
Anonymous
Not applicable
Author

Just looking at your expression tells me that you dont have any '' round the expression for Año in the set analysis... maybe start there?

Colin-Albert

Try removing the #

count( {$< Año= { $(=Only(Año-1)) }, TipoID = {'P1'} > } Id )

Anonymous
Not applicable
Author

Hello,

Can you share a .qvf or .qvw?

BR

Serhan

Not applicable
Author

Hi Serhan,

I'm not sharing , I'm just experimenting with Sense, to see if I can create a similar Dashboard.

Thanks,

Javier

Not applicable
Author

Hi Colin,

That does not work.

Thanks,

Javier

Not applicable
Author

Año (Year in english)  is a dimension. The I have a filtering panel.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=count( {$< [Año]= { $(#=Only([Año]-1)) }, TipoID = {'P1'} > } Id )


Only() should have one possible value, check whether [Año] has one possible value, otherwise Max() or Min() instead of Only().


Regards,

Jagan.

Not applicable
Author

Hi Jagan

Sorry, but not work.

Thanks,

Javier

Colin-Albert

Can you add a text object to check the value of

= $(#=Only([Año]-1))

or

= $(#=Only([Año]) -1)

and also try

= $(#=Max([Año]-1))

Only() will return Null if nothing or more than 1 value is selected.

Using Max() or Maxstring() instead is a safer option.