Quantcast
Channel: SCN : Discussion List - SAP Business Explorer (SAP BEx)
Viewing all articles
Browse latest Browse all 4032

Getting the keyfigure of HIGHEST DATE for a certain range date

$
0
0

Hi guyz,

 

Just want to ask how will I do this? Can I do this in CMOD, transformation or in query?

 

 

RAW DATA:

 

Date                    Customer               Rebate

20130925          A                              10

20130926          A                              20

20130928          A                              30

20130929          A                              40

20130930          A                              50

20131003          A                              60

20131004          A                              70

20131005          A                              80

20131007          A                              90

20131010          A                              100

20131011          A                              110

 

 

OUTPUT RESULT:

 

Variable Screen: DATE RANGE = 20131001 - 20131009

 

Date (Monthly)          Customer          Rebate

201310                      A                         90

 

 

 

NOTE:

Since the entered range of date is 20131001 - 20131009, the shown rebate should be the rebate for 20131009..However, since there is no  20131009, the rebate that should appear is the next highest date with rebate not equal to zero(0) or blank, hence 20131007 in the example above..

 

 

 

So if the user entered 20131001 - 20131002, the output should be 50 since the next highest date is 20130930..

 

OUTPUT:

Date (Monthly)          Customer          Rebate

201310                      A                         50

 

 

Thank you!

 

Loed


Viewing all articles
Browse latest Browse all 4032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>