Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Abhi999
Contributor III
Contributor III

Not equal <> is not working at script level varaible

below expression is not working at script level.

LET vWeek_End_Not <> date(max(week_ending)-7,'DD/MM/YYYY')

2 Replies
Thiago_Justen_

Hello,

What about you change things like this?

LET vWeek_End_Not = date(max(week_ending)-7,'DD/MM/YYYY');

 

Then  you put it into a where clause, for instance:

Load 

Your_Fields

From your_db where week_ending <> '$(vWeek_End_Not)';

Try this out and tell us what happened.

Regards

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
MayilVahanan

Hi @Abhi999 

LET vWeek_End_Not <> date(max(week_ending)-7,'DD/MM/YYYY')

Max function not work in "Let" statement. 

You need to try like below

Load max(week_ending) as MaxWeek resident yoursourcetable;

Let vWeek_End_Not  = Date(Peek('MaxWeek')-7,'DD/MM/YYYY');

Load

* from your_Sourcetable where week_ending <> '$(vWeek_End_Not)';

Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.