Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
trying to sum up sales data (with field YYYYMM) between two date ranges. For ex: Sum of sales data between campaign date (201801) and campaign after date (201803) essentially trying to sum all sales data for the period of 3 months (before/after campaign)
Something on the lines of the formula below : any help is much appreciated.
NUM(Sum({<DataType={'Sales'},
YYYYMM={"=YYYYMM<CampaignDateAfter_YYYYMM"},
YYYYMM={"=YYYYMM>CampaignDate_YYYYMM"},
>}Sales_Cost_USD))
Hiw about this?
NUM(Sum({<DataType={'Sales'},
YYYYMM={"=YYYYMM<CampaignDateAfter_YYYYMM and YYYYMM>CampaignDate_YYYYMM"},
>}Sales_Cost_USD))
If you would like to filter the YYYYMM field based on the values in the Campaign Date field for upto 3 months, you can use something like this:
Sum({<DataType={'Sales'}, YYYYMM = {">=$(=addmonths(CampaignDate_YYYYMM, 0))<=$(=addmonths(CampaignDate_YYYYMM,3))"}>} Sales_Cost_USD)
If the fields YYYYMM and/or CampaignDate_YYYYMM are not valid Date fields, you may add such fields to the data model.
Thank you Sir, looks like this will work.