cancel
Showing results for 
Search instead for 
Did you mean: 

Bex query If Else flag

Former Member
0 Kudos

Hi,

I have a requirement where I need to check if created date > (today's date-180) then Yes else No. I can write this statement in Bex query designer like below:

(Create date>(today's date-180))*1+0

However I want to display YES if conditions meets else NO. Is there any way to achieve this in query designer formula.

Thanks,

Arvind

Accepted Solutions (1)

Accepted Solutions (1)

anshu_lilhori
Active Contributor
0 Kudos

You cannot populate text at BEx level.

The only workaround which you can do--go to query properties--display tab--show zero as text--and you can write NO there.

But this will be applied globally for all 0's in the query.

Again 1 will remain as 1 and 0 can be replaced with text by using the above property.

Regards,

AL

Former Member
0 Kudos

Hi Anshu,

Thanks for your reply. But I want to show Yes/No in the report however i think this is not possible. I need to write a piece of code then.

Thanks!

anshu_lilhori
Active Contributor
0 Kudos

Yes this seems to be the limitation as i told you in my last reply.If you are flexible with modeling level changes then you can do the same  with a simple code.

And if you are using WebI then it is possible there as well.

Regards,

AL

Answers (2)

Answers (2)

former_member182470
Active Contributor
0 Kudos

As you know, we can't populate texts on the fly in Bex unless the value is Zero. Instead i have an idea. Try this:--

Create a new Char Infoobject(text) of length 3 and maintain two records YES and NO

Write a BADI for your Virtual KF with your logic. This way you can populate Text dynamically.

Else, you can write a VBA Macro in Analyzer.

Former Member
0 Kudos

Hi Arvind,

This is easier achieved at report level, if your requirement is inline with this.

Regards,

Srilakshmi B

Former Member
0 Kudos

Want to display yes/no at report formula level..is it possible?