Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ecabanas
Creator II
Creator II

Calculated dimension

Hi I have a table like this:

salesid          sales

pv001               10

pv002               20

pv991               10

and salesid as a Dimension, but I only want to see the salesid that begins by "PV00" not PV9

Many thank's

Eduard

1 Solution

Accepted Solutions
jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

you can use this expression:

=if(wildmatch(salesid, 'PV00*'), salesid, null() ) and check the option "suppress value when null",

regards

View solution in original post

8 Replies
ramoncova06
Partner - Specialist III
Partner - Specialist III

try this

sum( {$<salesid ={"pv0*"}>} sales )

ecabanas
Creator II
Creator II
Author

Hi Ramon,

I did this, but when you select one from the list did not works, The selecction did not works. I would like do the filter via Dimension not via Expression

Many thank's

Eduard

sunny_talwar

Try this as your calculated dimension:

If(WildMatch(salesid, 'pv0*'), salesid) and don't forget to check suppress null values

Best,

Sunny

ramoncova06
Partner - Specialist III
Partner - Specialist III

are your sales id upper or lower case ?

to do this in the dimension you have to do the following if(left(salesid,3) <> 'PV9', salesid) then select excluded null values

though I would still suggest to try to get the expression to work since you tend to get better performance

sunny_talwar

I agree with Ramon Covarrubias‌. Its better to have the expression do the job for you unless you have 50 expressions and repeating the same condition is going to be painful.

Best,

Sunny

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi,

you can use this expression:

=if(wildmatch(salesid, 'PV00*'), salesid, null() ) and check the option "suppress value when null",

regards

ecabanas
Creator II
Creator II
Author

Hi Ramon,

The Dexpression works fine, but what happens when I want to exclude the PV9 and PVR ?

Many many thank's to all to help to me

Eduard

amit_saini
Master III
Master III

Hi,

try:

=if(Left(salesid, 4) = 'PV00', salesid)

Thanks,
AS