Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Help With TotalMTD Formula with IF Expression

Hi!

I created a sales forecast but since it is July 1, there are some of our branches that do not have sales yet. I have a sold measure that calculates total sold but since some branches do not have sales it is pulling total for previous month (june).

Sold = CALCULATE(
TOTALMTD(
SUM('Sales Data'[sales_price]),
'Sales Data'[invoice_date]
)
)

The only correct branch showing is Tampa with $490 of sales. 

I have tried creating another measure to put 0 in place of branches with no sales yet, but it does not work.
Sold2 = if( isblank[sold], 0, [sold])

Any assistance on how I can fix this is appreciated!