Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Choosing dynamic value in varialble

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.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Create vFrac in UI Side

=Aggr(if(Today = Date(Today(),'MM/DD/YYYY'), Dec),Today)

View solution in original post

5 Replies
MK_QSL
MVP
MVP

Create vFrac in UI Side

=Aggr(if(Today = Date(Today(),'MM/DD/YYYY'), Dec),Today)

Not applicable
Author

Thanks Manish, Duh! I totally forgot about Aggr. Thanks once again.

jaimeaguilar
Partner - Specialist II
Partner - Specialist II

Hi, you can also do it from the script,

please check the attached example,

regards

sebastiandperei
Specialist
Specialist

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.

Not applicable
Author

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.