Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
gabriele
Contributor
Contributor

Use variables

Hello.

I don't know how to use the variables well.

 

I have defined them this way: 

vGG_DataOfferta = DayNumberOfYear(DataOfferta.autoCalendar.Date)

vGG_oggi = DayNumberOfYear(Today()).

 

I wrote:

Count ({$ <vGG_DataOfferta  = {"<$ (vGG_oggi)"}>} [Serial Client])

but it produces an incorrect result.

 

Who can help me?

Labels (1)
1 Solution

Accepted Solutions
marcus_sommer

The left part of a set analyses matching must be a native field and not an expression. This means you need to create the DayNumberOfYear() within your calendar and then you could use:

Count ({$ < FieldDayNumberOfYear  = {"<$(=vGG_oggi)"}>} [Serial Client])

- Marcus

 

View solution in original post

4 Replies
yogiachilleos
Contributor III
Contributor III

Gabriele,

 

Why not use: 

vGG_DataOfferta = DataOfferta.autoCalendar.Date

vGG_oggi = Today()

Count ({$ <vGG_DataOfferta  = {$(vGG_oggi)}>} [Serial Client])

Having the DayNumberOfYear is just adding extra work to the set analysis.

Try that and if that doesn't work please let me know what the result is and what you're expecting.

 

Kind regards,

Yogi Achilleos

gabriele
Contributor
Contributor
Author

Hello.

I need to do evaluations for different years, up to the same day today, namely:

2019/01/01 - 2019/06/03 -> count ([Serial Client])

2018/01/01 - 2018/06/03 -> count ([Serial Client])

2017/01/01 - 2017/06/03 -> count ([Serial Client])

 

Any suggest for it?

 

marcus_sommer

The left part of a set analyses matching must be a native field and not an expression. This means you need to create the DayNumberOfYear() within your calendar and then you could use:

Count ({$ < FieldDayNumberOfYear  = {"<$(=vGG_oggi)"}>} [Serial Client])

- Marcus

 

gabriele
Contributor
Contributor
Author

Perfect, thank you!!