Mesures to show 90 days prior number

Hello All,

I have a measure called Net Sales $ and I have to show the measures 90days back from current date?

I have created a variable.

=RelativeDate(CurrentDate();-90)

I tried to use =[Net Sales $]Where(RelativeDate(CurrentDate();-90))

It is showing an error
The expression or sub-expression at position 22 in the ‘[Net Sales $]’ function uses an invalid data type. (IES 10037)

Thanks for your help.
SH


SH3230 (BOB member since 2010-10-25)

According to what you posted, you have a relative date calculation, but nothing you are comparing it to. You need the date that pertains to the net sales variable you are trying to match to the -90 day relative date.


tendernips (BOB member since 2017-07-27)

I have a date variable called end date which is the userresponse of prompt end date.

Variable=Userresponse(“End date”)…

I want to show net revenue of Net Sales $ of previous 90 days.

Any help.

Thanks
SH


SH3230 (BOB member since 2010-10-25)

Depending on the type of prompt you’re using for your end date user response field, you will potentially only have the one date entered there, and even if it is a list, it will be a semicolon delimited string.

If you have a date object in the report that is specific to each record that goes into your net sales (like transaction date, order fulfilled date, etc. depending on business rules) you could use the relative date logic to narrow your net sales calculation to those dates of the required type falling within your 90 day range.


tendernips (BOB member since 2017-07-27)

I have a date object called Ending_Date

I created V_30daysbackdate

=RelativeDate([Ending_Date];-30)

Created another filter object

=If([V_30daysbackdate]<=[Ending_Date];1;0)

I am confuse here with the filter object formula.

[Net_Sales_Amt] Where([Filter]=1)

Am i doing it correct code? I want 30 days prior of ending date.

Thanks
SH


SH3230 (BOB member since 2010-10-25)

it is better to do this in a separate data provider


erik.stenson :us: (BOB member since 2012-07-30)