MOM calculations by using two paramters

Hi All,
Please help me with the below query
I have two date parameters
I need to calculate the sales difference between two dates whatever we will select in parameters
Suppose if I am selecting 1st Jan 2025 in first parameter and I am selecting 1st mar 2025 im second parameter
It should show sales difference between 1st Jan to 1st March.

I appreciate your help in the same

Hi Nivu,
Let me try and better understand the requirement.
Start Date: 1/1/2025 Total Sales for <start_date> = $100
End Date: 3/1/2025 Total Sales for <end_date> = $200
difference = $100 - $200 = -100?

Thank you,
Dom

Hi deb,
Yes,your understanding is correct ,can you please help me with this.

  1. Create Start Date Parameter
  2. Create End Date Parameter
  3. Create Calculated Start Date Calculated field - ifelse({Transaction Date} = ${sDate}, {sales_amount}, 0)
  4. Create Calculated Start Date Calculated field - ifelse({Transaction Date} = ${eDate}, {sales_amount}, 0)
  5. Create Difference calculated field - sum(ifelse({Transaction Date} = ${eDate}, {sales_amount}, 0)) -
    sum(ifelse({Transaction Date} = ${sDate}, {sales_amount}, 0))

number 3 and 4. are not really required but helpful for verification.