Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

set analysis issue

i used this expression:

SUM({<SITUATION={"=<$(=Date#(SITUATION))"}>}PRODUCTTION_VOLUME_TND)

always it return 0 , but when i change the expression

SUM({<SITUATION={"=$(=Date#(SITUATION))"}>}PRODUCTTION_VOLUME_TND)


it works correctly but i need to sum all productio_volume_tnd when situation <= $situation

12 Replies
Anil_Babu_Samineni

Try this?

SUM({<SITUATION={"<=$(=Max(SITUATION))"}>}PRODUCTTION_VOLUME_TND)

OR

SUM({<SITUATION={"<=$(=Date(Max(SITUATION), 'MM-YYYY'))"}>}PRODUCTTION_VOLUME_TND)


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Is SITUTATION read as a date field from the script? If not, I would suggest to make sure that it is read as date like this

Date(MonthStart(Date#(SITUATION, 'MM-YYYY')), 'MM-YYYY') as SITUATION

One you have this, you can try this

Sum({<SITUATION = {"<=$(=Date(Max(SITUATION), 'MM-YYYY'))"}>} PRODUCTTION_VOLUME_TND)

Make sure < is before =

<=      Right

=<      Wrong

MarcoWedel

Hi,

one alternative solution might be

The As-Of Table

hope this helps

regards

Marco