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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
pascos88
Creator II
Creator II

error in sintax qs

Hi Guys what is wrong with this?

= MaxString({<CampaignYear_Fact = {$(CampaignYear_Fact)-1}>} ValueReviewed)

I would have the ValueReviewed value of the last year. So CampaignYear_Fact -1.


Thanks a lot

Labels (1)
1 Solution

Accepted Solutions
avinashelite
MVP
MVP

Did you tried this

=Aggr(MaxString({<CampaignYear_Fact  = {"$(=Max(CampaignYear_Fact)-1)"}>}ValueReviewed),dimesion)


if it still does not work then please share the sample app

View solution in original post

10 Replies
MK_QSL
MVP
MVP

may be try

=MaxString({<CampaignYear_Fact  = {"$(=Max(CampaignYear_Fact)-1)"}>}ValueReviewed)

avinashelite
MVP
MVP

$(CampaignYear_Fact)- is referring to variable or field ..if its field the your syntax is wrong

follow Manish approach

pascos88
Creator II
Creator II
Author

it is a field... How I should write it?

avinashelite
MVP
MVP

Follow Manish approach that should work

=MaxString({<CampaignYear_Fact  = {"$(=Max(CampaignYear_Fact)-1)"}>}ValueReviewed)

pascos88
Creator II
Creator II
Author

doesn't works, still in the table I got Invalid dimension. CampaignYear_Fact  is a field, and I would have info about  ValueReviewed but last years, than something like CampaignYear_Fact- 1

avinashelite
MVP
MVP

Your trying this in the dimension ?? try like this then

=Aggr(MaxString({<CampaignYear_Fact  = {"$(=Max(CampaignYear_Fact)-1)"}>}ValueReviewed),dimesion)

pascos88
Creator II
Creator II
Author

unfortunately doesn't....

chinnuchinni
Creator III
Creator III

CampaignYear_Fact  is in year foamat or date_format ?



if it is in date format,use the below:


=MaxString({<CampaignYear_Fact  = {"$(=Max(Year(CampaignYear_Fact))-1)"}>}ValueReviewed)

pascos88
Creator II
Creator II
Author

it is already in year, with this formula I get an Invalid dimension, even if the script in the table looks good. I mean onche I write the set expression, there is no error..