Forum Discussion
Creating a Measure to Calculate MTD Revenue.
Hello,
I am having trouble creating a measure that shows the MTD Revenue. I need to use a measure for this because I am using it to fill a Tacometer. Below is the problematic code.
Revenue MTD =
CALCULATE(
SUM(ArSalesMove[InvoiceValue],
FILTER('ArSalesMove'),
'ArSalesMove'[Transaction Year] = MAX ( 'ArSalesMove'[Transaction Year] ) &&
'ArSalesMove'[Transaction Month] = MAX ('ArSalesMove'[Transaction Month]) &&
'ArSalesMove'[TrnDate] <= MAX ( 'ArSalesMove'[TrnDate] )
)
)
I keep getting "Too few arguments were passed to the FILTER function. The minimum count for the function is 2."
Any help would be greatly appreciated.
Hi knotpc
Try this formula
Revenue MTD = CALCULATE ( SUM ( ArSalesMove[InvoiceValue] ), FILTER ( 'ArSalesMove', 'ArSalesMove'[Transaction Year] = MAX ( 'ArSalesMove'[Transaction Year] ) && 'ArSalesMove'[Transaction Month] = MAX ( 'ArSalesMove'[Transaction Month] ) && 'ArSalesMove'[TrnDate] <= MAX ( 'ArSalesMove'[TrnDate] ) ) )Pay attention to the red character which is different from your formula.
Best Regards
Maggie
1 Reply
- v-juanli-msft
Community Support
Hi knotpc
Try this formula
Revenue MTD = CALCULATE ( SUM ( ArSalesMove[InvoiceValue] ), FILTER ( 'ArSalesMove', 'ArSalesMove'[Transaction Year] = MAX ( 'ArSalesMove'[Transaction Year] ) && 'ArSalesMove'[Transaction Month] = MAX ( 'ArSalesMove'[Transaction Month] ) && 'ArSalesMove'[TrnDate] <= MAX ( 'ArSalesMove'[TrnDate] ) ) )Pay attention to the red character which is different from your formula.
Best Regards
Maggie