Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
chriscools
Creator II
Creator II

function with max (date) doesn't work in set analysis

Hello,

i have an expression to give me the sum of € open for a certain date:

sum({<OrderDateDeliveryFrom ={"<15/2/2013"}>} OrderPriceUnitNet  * OrderQtyOpen

And this works ok, but i don't want to change the date everytime i want a current number, i tried this:

sum ({<OrderDateDeliveryFrom = Max (Date) >} OrderPriceUnitNet  * OrderQtyOpen ) 

but it doesn't work...

can someone see what i did wrong?

thanx!!

chris

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try:

sum ({<OrderDateDeliveryFrom = {'$(=Max(Date))'} >} OrderPriceUnitNet  * OrderQtyOpen )


talk is cheap, supply exceeds demand

View solution in original post

6 Replies
Gysbert_Wassenaar

Try:

sum ({<OrderDateDeliveryFrom = {'$(=Max(Date))'} >} OrderPriceUnitNet  * OrderQtyOpen )


talk is cheap, supply exceeds demand
leonardo_raed
Partner - Contributor III
Partner - Contributor III

Hi Chris,

I always use a straight table to see how the set analysis is evaluated. You can do it keeping the label of the expression empty.

For example:

Dibujo.JPG

chriscools
Creator II
Creator II
Author

Hey Leonardo,

i don't understand how you build your evalution and how i should read it to conclude what might be wrong.

actually i'm not at all familiar with what your doing... 🙂

grtz,

chris

chriscools
Creator II
Creator II
Author

Hello Gysbert,

i tried to do the same to give me the sum for the current week by doing this, but why doesn't that work if i add the week?

sum({<OrderDateDeliveryFrom = {'$ (= Week( Max (Date)))'} >} OrderPriceUnitNet  * OrderQtyOpen

grtz,

chris

Gysbert_Wassenaar

Week returns the week number as an integer, not a date. You'll have to use something like

OrderDateDeliveryFrom = {'>=$(=weekstart(max(Date)))<=$(=max(Date))'}


talk is cheap, supply exceeds demand
Not applicable

Me ayudas por favor?

Indicador en Tabla pivote