Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

pascos88
Contributor

how use set expression with a String field

Hello,

how can I write this expression ?

=maxstring({<CampaignID = {$(v_Last_Year)}>}MissingCompanyName)

MissingCompanyName is a string, maybe the aggregation is wrong.. Coould I use something else in stead of maxstring?

Thabks for any help

1 Solution

Accepted Solutions
pascos88
Contributor

Re: how use set expression with a String field

HI,

now it work just with this...

= maxstring({<CampaignID={$(v_Last_Year)}>} MissingCOmpanyName)

I don't know why didn't works before.. Thanjs for your time

10 Replies

Re: how use set expression with a String field

You can use MaxString, MinString or Only functions

pascos88
Contributor

Re: how use set expression with a String field

I am tring qwith this:

= Aggr(Only({1<CampaignID = {$(v_Last_Year)}>} MissingCOmpanyName), MissingCOmpanyName)

but why it change with my selections, even if I pu 1 in the formula?

Re: how use set expression with a String field

What is v_Last_Year? and you are using this as a dimension?

pascos88
Contributor

Re: how use set expression with a String field

v_last_year is a variable created in the load script.

I am just outting this formula in a column of table

Re: how use set expression with a String field

I am just outting this formula in a column of table

As a dimension or Measure?

v_last_year is a variable created in the load script.

How do you define it?

pascos88
Contributor

Re: how use set expression with a String field

LET v_Last_Year = Peek('LastCampID', 1, 'LastCam_ID');

v_Last_Year  it is a number 1000102 (it workd fine)

I use the formula as dimension

Re: how use set expression with a String field

Okay, it make sense, now if you have expressions, may be you need to ignore selection in them also... may be using the same set analysis that you used here

pascos88
Contributor

Re: how use set expression with a String field

using

= Aggr(Only({1<CampaignID = {$(v_This_Year)}>} CampaignID), CampaignID)

looks that the set expression doesn't work. I mean I have two CampaignID, and once I change select in this filter, the column change values..

Looks that {1<CampaignID = {$(v_This_Year)}>}  doesn't do his job..

How can be ?

Re: how use set expression with a String field

What all dimensions and measure do you have in your chart? Can you share all of them here?

Community Browser