Incorrect Totals Even with HASONEVALUE and ISINSCOPE

I’ve had this issue with another report and solved it using a DAX formula that included HASONEVALUE. But this one has me stumped. The goal is to estimate revenue for the current month using open opportunities and estimated ecommerce sales. My final model will also add in actual sales to date as part of the calculation, so I only need to add the percentage of month remaining for these two calculations.

  • Open opportunities that are scheduled to close this month are calculated, then multiplied times the percentage of month that remains (DIVIDE [Remaining work days], [Total work days], 0).

  • Secondly, ecommerce revenue for the previous month is calculated and multiplied by the same percentage of month that remains.

My subtotals and totals are way off, and I feel like it has something to do with the calculation of the percentage of month remaining. But I’m not able to figure it out.

Attached is a pbix file with relevant information. Thanks.
Sales Goals2.pbix (462.7 KB)

Variables are immutable

image

Adjust your measurements as below:

Projected Curr Month Proposal = 
VAR vExpected = [Remaining Month %] * [Proposal Pipeline Curr Month]
VAR vWeighted =
    IF (
        HASONEVALUE ( Territory[Territory] ),
        vExpected,
        SUMX ( VALUES ( 'Territory'[Territory] ), [Remaining Month %] * [Proposal Pipeline Curr Month] )
    )
RETURN
    vWeighted

Thanks @VilmarSchi.