Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
laura_beltran
Contributor
Contributor

dinamic range dates set analysis

I have this "harcoding " expression:

sum( { < [Fecha]={">=02/01/2017 <=13/02/2017"}> } [Venta Neta])

Now i want to put this dates in a variable, to make a dinamic set analysis:

vMaxFechaVenta = date('13/02/2017')

vMaxFechaVentaComprable=  date('02/01/2017')

I change the expression like:

sum({<[Fecha]= {">=$(vMaxFechaCargaComparable) <= $(vMaxFechaCarga)"} > } [Venta Neta])

I tried diferents expressions but it doesn't works:

sum({ <[Fecha]= {'>= $(=vMaxFechaCargaComparable) <=$(=vMaxFechaCarga) }'> } [Venta Neta] )

sum( { < [Fecha]= {">={$(vMaxFechaCargaComparable)}"  "<={$(vMaxFechaCarga)}"} > } [Venta Neta])

sum( { < [Fecha]= {">=$(=$(vMaxFechaCargaComparable))<=$(=$(vMaxFechaCarga))"}>}[Venta Neta])

and a diferents options, but none works, 

can anyone help me please????

 Thankssssss

Labels (1)
7 Replies
Channa
Specialist III
Specialist III

=count(DATE_OF_JOINING_New={">=$(vYearStart_Join)<=$(vYearCurDate_Join)"}>} EMPLOYEE_NUMBER)

 

it works for me same case try

Channa
pradosh_thakur
Master II
Master II

vMaxFechaVenta =                          =date#('13/02/2017','DD/MM/YYYY')

vMaxFechaVentaComprable=            = date#('02/01/2017','DD/MM/YYYY')

Mark i have put a '=' deliberately

 

sum({<[Fecha]= {">=$(vMaxFechaCargaComparable) <= $(vMaxFechaCarga)"} > } [Venta Neta])

 

Learning never stops.
laura_beltran
Contributor
Contributor
Author

Hi , Thanks you for your response, but it doesn't works

If i declare variable like you say: vMaxFechaVenta =                          =date#('13/02/2017','DD/MM/YYYY')

Then I evaluate, and i have 30/12/1899

 

And the result is different,, i'll show you;

Captura.JPG

pradosh_thakur
Master II
Master II

how is  =date#('13/02/2017','DD/MM/YYYY') evaluated to 30/12/1899. Can you show the variable description ?

Learning never stops.
Channa
Specialist III
Specialist III

try 

 

=date(date#('13/02/2017','DD/MM/YYYY') ,'DD/MM/YYYY')

Channa
laura_beltran
Contributor
Contributor
Author

Yes,  I declare the variable

VariableMaxFecha.JPG

 

And then I evaluate, and i get this result. Is declared as a Date

 

Description.JPG

laura_beltran
Contributor
Contributor
Author

Channa

 

I get the same result (30/12/1899) . amd is declare as a date-- don't yoy get the same result?