> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theoptimizer.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Compare Date Ranges

> Set your reporting date range, enable period-over-period comparisons, and choose which columns display the comparison data. 

export const ArcadeVideoButton = ({id, title = "Watch interactive demo", label = "Watch Video"}) => {
  const [open, setOpen] = useState(false);
  return <div style={{
    display: 'inline-block'
  }}>
      <button type="button" onClick={() => setOpen(true)} style={{
    display: 'inline-flex',
    alignItems: 'center',
    gap: '8px',
    backgroundColor: '#3e47ec',
    color: '#ffffff',
    border: 'none',
    padding: '10px 18px',
    borderRadius: '8px',
    fontSize: '15px',
    fontWeight: '600',
    cursor: 'pointer'
  }}>
        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="white">
          <polygon points="5,3 19,12 5,21" />
        </svg>
        {label}
      </button>

      {open && <div onClick={() => setOpen(false)} style={{
    position: 'fixed',
    top: 0,
    left: 0,
    width: '100%',
    height: '100%',
    backgroundColor: 'rgba(0, 0, 0, 0.85)',
    zIndex: 9999999,
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center'
  }}>
          <div onClick={e => e.stopPropagation()} style={{
    width: '90%',
    maxWidth: '1100px',
    aspectRatio: '16 / 9',
    borderRadius: '12px',
    overflow: 'hidden',
    position: 'relative'
  }}>
            <iframe src={`https://demo.arcade.software/${id}?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true`} title={title} frameBorder="0" loading="lazy" allowFullScreen allow="clipboard-write" style={{
    width: '100%',
    height: '100%',
    border: 'none',
    colorScheme: 'light'
  }} />
          </div>

          <button type="button" onClick={() => setOpen(false)} style={{
    position: 'fixed',
    top: '20px',
    right: '24px',
    background: 'rgba(255,255,255,0.15)',
    border: 'none',
    color: '#ffffff',
    fontSize: '24px',
    lineHeight: 1,
    width: '40px',
    height: '40px',
    borderRadius: '50%',
    cursor: 'pointer',
    display: 'flex',
    alignItems: 'center',
    justifyContent: 'center'
  }}>
            ✕
          </button>
        </div>}
    </div>;
};

export const ArcadePopoutModal = ({id, title = "Interactive demo"}) => {
  const [isPopout, setIsPopout] = useState(false);
  const iframeRef = useRef(null);
  useEffect(() => {
    function onArcadeIframeMessage(e) {
      if (e.origin !== 'https://demo.arcade.software' || !e.isTrusted) return;
      if (!iframeRef.current || !iframeRef.current.contentWindow) return;
      if (e.data.event === 'arcade-init') {
        iframeRef.current.contentWindow.postMessage({
          event: 'register-popout-handler'
        }, '*');
      }
      if (e.data.event === 'arcade-popout-open') {
        setIsPopout(true);
      }
      if (e.data.event === 'arcade-popout-close') {
        setIsPopout(false);
      }
    }
    window.addEventListener('message', onArcadeIframeMessage);
    return () => window.removeEventListener('message', onArcadeIframeMessage);
  }, []);
  return <div style={{
    position: 'relative',
    paddingBottom: 'calc(54.4737% + 41px)',
    height: 0,
    width: '100%'
  }}>
      <iframe ref={iframeRef} src={`https://demo.arcade.software/${id}?embed&embed_mobile=tab&embed_desktop=modal&show_copy_link=true`} title={title} frameBorder="0" loading="lazy" allowFullScreen allow="clipboard-write" style={{
    position: isPopout ? 'fixed' : 'absolute',
    top: 0,
    left: 0,
    width: '100%',
    height: '100%',
    zIndex: isPopout ? 9999999 : 'auto',
    colorScheme: 'light'
  }} />
    </div>;
};

<Frame>
  <img src="https://mintcdn.com/theoptimizer/d8i_PgwXHcJW-VUm/images/campaigns-compare-dates-dialog.png?fit=max&auto=format&n=d8i_PgwXHcJW-VUm&q=85&s=cbdb223912dfa97d6e2dfb52124e156c" alt="Campaigns Compare Dates Dialog" width="1348" height="1268" data-path="images/campaigns-compare-dates-dialog.png" />
</Frame>

## Setting a Date Range

The date picker is in the top-right corner of the navigation bar. Click it to change the reporting interval for the entire view.

Available presets: **Today**, **Yesterday**, **Last 3 / 7 / 14 / 30 days**, **Last 90 days**, **This month**, **Last month**, **Last 6 months**, and a fully custom calendar range.

***

## Comparing Two Periods

Inside the date picker, enable the **Compare dates** toggle. You can then select a second date range to compare against the primary one.

<Tip>
  Use **Compare dates** to spot performance shifts between periods — for example, this week vs. last week — to measure the impact of a recent creative or budget change.
</Tip>

***

## Choosing Which Columns Show Comparison Data

Comparison data only appears for metrics you have designated as compare columns. You configure this inside **Column Management**.

<Steps>
  <Step title="Open Column Management">
    Click the column settings icon at the bottom-left of the table.
  </Step>

  <Step title="Switch to Compare Columns">
    Click the **Compare Columns** tab at the top right of the dialog.
  </Step>

  <Step title="Select your metrics">
    Select the metrics you want to see side-by-side comparison data for (e.g., Amount Spent, Revenue, Conversions).
  </Step>

  <Step title="Save as preset">
    Click **Save as preset**.
  </Step>
</Steps>

Once set up, activating **Compare dates** in the date picker causes each selected metric to display an additional column showing the value for the comparison period — making it easy to see at a glance whether spend went up, conversions dropped, or ROI improved between the two periods.
