Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have a table in QlikView:
Frac:
load * Inline [
Today, Dec
07/24/2014, 6.1
07/25/2014, 6.3
07/26/2014, 6.5
];
So I want to create a variable where it picks up the value of Dec based if the date is today. For EG: if today is July 25th 2014 it should store 6.3 in the variable.
I tried something like this but it didn't work:
let vFrac = if(Today = Date(Today(),'MM/DD/YYYY', Dec);
Any suggestions and ideas will be appreciated.
Thanks.
Create vFrac in UI Side
=Aggr(if(Today = Date(Today(),'MM/DD/YYYY'), Dec),Today)
Create vFrac in UI Side
=Aggr(if(Today = Date(Today(),'MM/DD/YYYY'), Dec),Today)
Thanks Manish, Duh! I totally forgot about Aggr. Thanks once again.
Hi, you can also do it from the script,
please check the attached example,
regards
Why you want to get this in a variable?
The variable could have a value (6.1), or an expression. The value could be upgraded from actions, but not for expressions. But if you use an expression like Manish example, you need to use $(variable) to replace these text for the expression.
Please, tell us how you will use these value.
Actually I'm using them to divide something so the value of the denominator will change accordingly to the new date.
So, I am creating an expression where = [Numerator]/$(vFrac)
Thanks.