Skip to main content
Announcements
Global Transformation Awards submissions are open! SUBMIT YOUR STORY
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set expression not working returning '0'

Hi Everyone

I've been trying to get below set expression to work. However, I can figure out what I'm doing wrong.

As you can see, the first Set Expression is concerning Months, and the second is concerning Year.

Can it be something with the structure of the datafield AD_CAL_MONTH? It contains the data 01,02.....12.

Udklip.JPG

I hope that someone can help

Stefan

8 Replies
manideep78
Partner - Specialist

add this instead of AD_CAL_MONTH

(=only(num(AD_CAL_MONTH,'#'))-1)

Anonymous
Not applicable
Author

It still returns '0'

Sum({$<AD_CAL_MONTH={$(=only(num(AD_CAL_MONTH,'#'))-1)}>}if(CUSTOMER.CGRNO <> 'IA' And CUSTOMER.CGRNO <> 'KA' And CUSTOMER.CGRNO <> 'BA' ,  New_NET))

manideep78
Partner - Specialist

what is the expected output and can u post the sample app??

also what is the data that present in AD_CAL_YEAR field?

sunny_talwar

Are you selecting a single AD_CAL_MONTH? May be try this

Sum({$<AD_CAL_MONTH = {$(=Num(Max(AD_CAL_MONTH)-1, '00'))}, CUSTOMER.CGRNO -= {'IA', 'KA', 'BA'}>} New_NET)

Anonymous
Not applicable
Author

Hi Sunny

That worked perfectly thanks

And Manideep thanks for your suggestion to.

Best

Stefan

sunny_talwar

No problem

manideep78
Partner - Specialist

mark the correct answer and close the thread 🙂

Anonymous
Not applicable
Author

There is NO green star "Correct Answer" to click?!