Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Data from two dates.

Hi,

I want to  generate a report such that selection of the report will be  any two months(Dynamic) and what the report should generate is the details of the employees who are available in the minimum month selection  but not available in the maximum month selection.

Regards,

Kavya

1 Solution

Accepted Solutions
swuehl
MVP
MVP

In your load script

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

LOAD *, Num(Month(Date#(Month,'MMM'))) as MonthNum

INLINE [

   Month, empname

   Jan, a

   Jan, b

   Jan, c

   Feb, a

   Feb, b

   Mar, a

   Mar, b

   Mar, d

];

Then in the frontend, e.g. in a text box:

=Concat(

{<empname = p({<MonthNum = {$(=Min(MonthNum))} >}) * e({<MonthNum = {$(=Max(MonthNum))} >}) >} empname)

View solution in original post

6 Replies
swuehl
MVP
MVP

Maybe like

=Concat(

{<EmployeeName = p({<MonthNum = {$(=Min(MonthNum))} >}) * e({<MonthNum = {$(=Max(MonthNum))} >}) >} EmployeeName)

Post some sample data if you need more specific help with the set expression.

mohitd910
Creator II
Creator II

Hi kavyasri,

You Can you Start Date and End Date Function in Expression Set or by Set analysis you can easily got data from two dates

avinashelite

post your app with sample data....that will help us to provide the solution

Not applicable
Author

Hi,

LOAD * INLINE [

    Month, empname

   Jan, a

    Jan, b

    Jan, c

    Feb, a

   Feb, b

    Mar, a

    Mar, b

    Mar, d

   

];

if i click on Jan and March (any month)i should get empname 'c',  i.e details of the employees who are available in the minimum month selection  but not available in the maximum month selection.


swuehl
MVP
MVP

In your load script

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

LOAD *, Num(Month(Date#(Month,'MMM'))) as MonthNum

INLINE [

   Month, empname

   Jan, a

   Jan, b

   Jan, c

   Feb, a

   Feb, b

   Mar, a

   Mar, b

   Mar, d

];

Then in the frontend, e.g. in a text box:

=Concat(

{<empname = p({<MonthNum = {$(=Min(MonthNum))} >}) * e({<MonthNum = {$(=Max(MonthNum))} >}) >} empname)

Not applicable
Author

Thank you