Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have the following script with Qlik Sense that works:
Let vDaysn = -7;
SQL SELECT [Field] FROM [dbo].[File] where DateField between DateAdd(DD,$(vDaysn),GETDATE() ) and GETDATE();
I would to make this dynamic introducing an entry field, be able to calculate the related negative in order to use that in SQL statement. Tried the following but it doesn't works:
Let vDays = '=if( $(vDays) = 0,7,$(vDays));
Let vDaysn = '=$(vDays) * -1';
Any suggestion?
Thanks
In this way your variables contain only a text - try it in this way:
Let vDaysn = -if($(vDays) = 0,7,$(vDays));
- Marcus
In this way your variables contain only a text - try it in this way:
Let vDaysn = -if($(vDays) = 0,7,$(vDays));
- Marcus