QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for
Did you mean:
Not applicable

How can I set right expression?

Hi guys,

Tell me please, How can I set expression with an exeption parameter?

For example: I have 3000 location, but 1700 is active and I need them.

Attribute: is location doesn't active "Pairing precession = -1"

This expression doesn't work:

( {<[Pairing precession]=[Pairing precession]-{'-1'}>} [Location])

Many thanks,

Yuriy

1 Solution

Accepted Solutions
Champion III

You want this in the script or in the Front end?

Try like in your Straight table Dimension

= If([Pairing Precession] <> -1, [ID Location])

OR

= Aggr(Only({< [Pairing Precession] = {'<>1'}>}), [ID Location])

Then supress Null Values.

Expr:

= [Pairing Precession]

9 Replies
MVP & Luminary

Pretty close. Something like this:

Count( {<[Pairing precession]= - {-1}>} [Location])

You need some sort of an Aggregation function (Count, Only, or anything else) in order to host your Set Analysis expression.

Cheers,

Oleg Troyansky

Champion III

Not clear what you are trying to do. Can you elaborate and give us more info for below?

Attribute: is location doesn't active "Pairing precession = -1"

This expression doesn't work:

( {<[Pairing precession]=[Pairing precession]-{'-1'}>} [Location])

are you doing a set analysis with Pairing precession as -1.

May be you want to try like

= Sum( {< [Pairing precession] -= {'-1'} >} [Location])

Not applicable
Author

Yes, of course. For example, I have:

ID location  Pairing Precession

 1 8:00:00 2 14:00:00 3 13:00:00 4 11:00:00 5 12:00:00 6 -1 7 11:00:00 8 11:00:00 9 11:00:00 10 -1 11 11:00:00 12 -1 13 11:00:00 14 -1

I want to see:

 1 8:00:00 2 14:00:00 3 13:00:00 4 11:00:00 5 12:00:00 7 11:00:00 8 11:00:00 9 11:00:00 11 11:00:00 13 11:00:00

How can I do it? help me, please.

Many thanks,

Yuriy

Not applicable
Author

Specialist III

if you have only one value for one ID then

Only({<Pairing Precession = Pairing Precession - {-1}>} Pairing Precession)

if your not successful then do this,

ID location  ,

Pairing Precession,

if(Pairing Precession = -1, 0,1) as Flag;

use this in set analysis

Only({<Flag-={0}>} Pairing Precession)

Creator

hi,

Attached is the solution.

Champion III

You want this in the script or in the Front end?

Try like in your Straight table Dimension

= If([Pairing Precession] <> -1, [ID Location])

OR

= Aggr(Only({< [Pairing Precession] = {'<>1'}>}), [ID Location])

Then supress Null Values.

Expr:

= [Pairing Precession]

Not applicable
Author

Thanks all. It was very useful for me.

You can use simple any one of below

Only({<[Pairing Precession] -= {'-1'}>} [Pairing Precession])

or

Only({<[Pairing Precession] = E({<[Pairing Precession] = {'-1'}>}[Pairing Precession])>} [Pairing Precession])

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)