Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pascos88
Creator II
Creator II

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
Creator II
Creator II
Author

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

View solution in original post

10 Replies
sunny_talwar

You can use MaxString, MinString or Only functions

pascos88
Creator II
Creator II
Author

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?

sunny_talwar

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

pascos88
Creator II
Creator II
Author

v_last_year is a variable created in the load script.

I am just outting this formula in a column of table

sunny_talwar

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
Creator II
Creator II
Author

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

sunny_talwar

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
Creator II
Creator II
Author

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 ?

sunny_talwar

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