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: 
Nolan
Contributor III
Contributor III

Time Variable - Using a dimension as variable

Hello,

 

We currently have a situation where we are attempting to insert this date field variable in the set expression below:

Sum({1 <Month= {$(vProductTime)}>} [QTY Each])

where vProductTime = [Product Date]

ProductDate being the date a product started on a specific contract. Date formatting between 'Month' & 'vProductTime' and all else equal, this expression only returns us 0 values. The expression looks correct to us, but is there anything in the syntax we are missing or is there some other easy fix? 

 

Appreciate any help you can offer

Labels (1)
2 Replies
RafaelBarrios
Partner - Specialist
Partner - Specialist

Hi @Nolan 

can you share screenshots of:

1. how the variable vProductTime is created

2. what is in this field Month

my first guess is that you are comparing a month name or number with a complete date.

and that you are missing a = sign en variable formula.

 

best,

Nolan
Contributor III
Contributor III
Author

Hi Rafael,

Thanks for the reply. 

 

The actual dimension and variable names are slightly different, but the same logic follows. The Variable is defined as the dimension below:

 

Nolan_0-1664293299520.png

 

And our Month dimension is defined as this, which I have tried to match the formatting in the Product Month dimension

Nolan_1-1664293393251.pngNolan_2-1664293413452.png

 

Basically we are trying to display data from the start of implementation of the contract and onward. So when you filter on a certain product, that specific implementation date is applied and displays only the relevant data. 

 

Thanks for any insights you are able to provide.