5 Replies Latest reply on Nov 6, 2017 7:21 PM by Deepak Rai

# On the Fly Calculations based on Date Filter

Hi All,

I have the below requirement.

The users will select a Date Range based on the Date field. If anyone of the sales in that Date range for an employee is greater than 500 I want to display as 'Y' else 'N'.

EmpCampaign
DateSalesCalculated field
1ABC08/10100Y
1EFG08/11600Y
1HIJ08/12250Y
2LMN08/11700Y
2OPQ08/12800Y
3RST08/1130N
4UVW08/125N

I tried using WINDOW_MAX(Max(sales)) but the function returns that maximum sales for all the days.  I need this to break by Emp>Camapign. If I use LOD 'Fixed', the function takes into account the Max(commission) for all the values in the table.

I've attached a sample workbook.

• ###### 1. Re: On the Fly Calculations based on Date Filter

May be u need this?

Thanks

Deepak

• ###### 2. Re: On the Fly Calculations based on Date Filter

Hi Deepak, Thank you for your reply. I tried this but it doesn't work in certain cases. can you take a look at the attached screenshot and the sample workbook and let me know your thoughts.

• ###### 3. Re: On the Fly Calculations based on Date Filter

It is just tuning of Formula, It is happening because there is confusion on what u need. Can you pl let me know why you have written Y for person in circle when Total is <500.

• ###### 4. Re: On the Fly Calculations based on Date Filter

I want it to say N but the calculated field I'm using is generating Y.

• ###### 5. Re: On the Fly Calculations based on Date Filter

Follow this 2 Step Process for your attached Example:

1. Add Ship Date to Context
2. Use this Calculation

You would get this, so the values will change as you would change the Ship Date in Filter

The attached is in 10.4 but you just need to use the 2 steps as above.

Hope it Helps and If it does, Please mark it Helpful and CORRECT.

Thanks

Deepak