Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
annabergendal
Partner - Creator
Partner - Creator

Less than variable in set analysis

I have a problem in my set analysis, when trying to get all values prior to a period.

It works to include all values within this period:

count( {$<ÅrVecka={'$(vPreviousWeekYear)'}>}  distinct CustomerPortLabel)

But this returns zero:

count( {$<ÅrVecka = {'<= ${=vPreviousWeek}'}>} distinct CustomerPortLabel)

What am I doing wrong?

Thanks

9 Replies
rubenmarin

Not sure if it's a typo, try:

count( {$<ÅrVecka = {'<= $(=vPreviousWeek)'}>} distinct CustomerPortLabel)

ashfaq_haseeb
Champion III
Champion III

Hi,

Try like this

count( {$<ÅrVecka = {'<= ${=vPreviousWeek}'}>} distinct CustomerPortLabel)

or

count( {$<ÅrVecka = {"<= ${=vPreviousWeek}"}>} distinct CustomerPortLabel)


Regards

ASHFAQ

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

The expression that works uses vPreviousWeekYear; the one that does not uses vPreviousWeek.


HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Colin-Albert

Try

     count( {$<ÅrVecka = {'<= $(vPreviousWeek)'} >} distinct CustomerPortLabel)

You should only need $(variablename) to evaluate the variable, not $(= variablename)

Not applicable

Hi,

Just remove { } and place the variable in ( )

count( {$<ÅrVecka = {'<= $(=vPreviousWeek)'}>} distinct CustomerPortLabel)

its_anandrjs

What is the definition of vPreviousWeek or you use wrong brackets like { } this remove it with ( ) for variable only

Count( {$<ÅrVecka = {'<= $( =vPreviousWeek )'}>} distinct CustomerPortLabel)


Or


Count( {$<ÅrVecka = {"<= $( =vPreviousWeek )"}>} distinct CustomerPortLabel)


Or


Count( {$<ÅrVecka = {'<= $( =Week(Today())-1 ) '}>} distinct CustomerPortLabel)


Regards

Anand

annabergendal
Partner - Creator
Partner - Creator
Author

You are right, I misspelled it, but they are both spelled vPreviousWeekYear in the app

annabergendal
Partner - Creator
Partner - Creator
Author

Thanks for all the advices, but none of these worked. I ended up using another syntax in the end with Date:

count( {$<Datum={"<$(=Date(weekstart($(vToday)),'YYYY-MM-DD'))"}>}  distinct CustomerPortLabel)

Don't ask me why this worked and the others did not... Some kind of syntax problem with the variable vPreviousWeekYear I guess, even though the other comparison worked.

ashfaq_haseeb
Champion III
Champion III

Hi,

Can you post sample to look over.

Regards

ASHFAQ