SAS Employee

## issue in New Calculated Field

Hello,

In list table, we can see Base_SALE, It is Average sales of the selected dates from slider.
I would like to use this Base_SALE, to calculate NEW_SALES. (where NEW_SALES=SALE/BASE_SALE)

Note:
1)I use filter interaction between slider and first list table.

2)In final 2nd list table, all dates should come (So,i can't use filter interaction between 1,2 and 3)

Regards
Harshil Gandhi
2 REPLIES 2
Fluorite | Level 6

## Re: issue in New Calculated Field

Hello Harshil Gandhi,

As, per your requirements You can following below steps that can useful for you.

1]. Calculate Base_SALE.

2]. Calculate NEW_SALES=SALE / BASE_SALE.

3]. Give filter  interaction between slider(date), First List Table (Base_SALE) and second List          Table(date, NEW_SALES).

But here you have to select FILTER TYPE in interaction between slider and second List table is BRUSH.

So, it will give all date and if you select Slider date then it will also effect in second list table but their is blue color row see.  that is your selected date in slider and other date is shown as a white color rows.

As per your reference see the all capture in attached file.

Quartz | Level 8

## Re: issue in New Calculated Field

Hi Harshil,

As I understand you want to be able to dynamicaly filter the period of base sale and then show the calculated new sales based on this number. The problem here is that the new sales can not use the same date filter as the base sales.

I think there is a solution but is not very straight forward. I don't have the time now to give a comprehensive answer but I think following steps would work:

- Instead of the timeslider use two drop down listboxes (date from, date to) and connect them to 2 parameters.

- Don't use interactions from these 2 drop-down listboxes.

- Create a new calculated item to filter the base sales using the 2 parameter values (using if then else)

- use the new calculated item in the aggregated measure to calculate new sales.