Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Michiel_QV_Fan
Specialist
Specialist

QV Components, add date variable

I'm adding new variables to the QV Components date variables.

Because I want to use a date island I tested in the GUI for the correct syntax and want to add this as new variables.

I want to create this new variable:

// Year To Date Productief Date island

Let $(_fieldPrefix)vSetYTDModifierProductiefDateIsland =

MapSubString('_qvctemp.Calendar.EscapeCharsMap',

'$(_vClearFieldList)

$(_f_DateSerial) = {">=$(=min(_DateIslandSerial))<=$(=max(_DateIslandSerial))"},

$(_fYear) = {"@(=$(_qvctemp.vMaxModifier)$(_fYear)))"}

,$(vProductieveUren)

'

);

Adding a new part in the variabel ,$(vProductieveUren) works as needed but I cannot get the DateIslandSerial part working.

The variable resolves in the fron end to >=<=.

I tried this:

$(_f_DateSerial) = {"@(>=$(=min(_DateIslandSerial))<=$(=max(_DateIslandSerial)))"}

and I tried placing the whole part {">=$(=min(_DateIslandSerial))<=$(=max(_DateIslandSerial))"} into another variable but the result remains the same.

Q: how do I need to format this part to resolve in the variable?

I'm using QV Components 10.1.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this one: $(_f_DateSerial) = {">=@(=min(_DateIslandSerial))<=@(=max(_DateIslandSerial))"},


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Kushal_Chawda

have tried using Date# function like below, date format should be same as $(_f_DateSerial) and $(_f_DateSerial) should be in proper date format

{">=$(=min(date#(_DateIslandSerial,'DD/MM/YYY')))<=$(=max(date#(_DateIslandSerial,'DD/MM/YYYY')))"}

Michiel_QV_Fan
Specialist
Specialist
Author

Change the format doesn't do anything.

The result I see in the variable is still >=<=

The DateIslandSerial isn't visible at all.

Gysbert_Wassenaar

Try this one: $(_f_DateSerial) = {">=@(=min(_DateIslandSerial))<=@(=max(_DateIslandSerial))"},


talk is cheap, supply exceeds demand
Michiel_QV_Fan
Specialist
Specialist
Author

Gysbert, can you explain what happens with the $ and @.

Is this the escape character mapping?

Gysbert_Wassenaar

Yes, that's right.


talk is cheap, supply exceeds demand