cancel
Showing results for
Did you mean:
Regular Visitor

## New measurement - total to date from count field

Hi, i need to calculate totals to date from *Count of SalesOrderNumber*, how do i do it, count number field is a count field ? My totals to date doesnt work:

Totals to date = CALCULATE([Count of SalesOrderNumber total for InvoiceCustomerAccountNumber], FILTER(ALL(SalesOrders[RequestedReceiptDate]), SalesOrders[RequestedReceiptDate] <= MAX(SalesOrders[RequestedReceiptDate])))

4 REPLIES 4
Community Support

Hi @Raimondas ,

Please update the formula of your measure [Totals to date] as below and check if you can get the expected result If still not, please provide some sample data in table SalesOrders. Thank you.

 Totals to date =CALCULATE (    [Count of SalesOrderNumber total for InvoiceCustomerAccountNumber],    FILTER (        ALL ( SalesOrders ),        SalesOrders[RequestedReceiptDate] <= MAX ( SalesOrders[RequestedReceiptDate] )    ))

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regular Visitor

Hi,

currently it is like this: (while it should be as specified in black underline bold numbers)

Community Support

Hi @Raimondas ,

Could you please provide some original data in table SalesOrders? And please provide the related formula of measure [Count of SalesOrderNumber total for InvoiceCustomerAccountNumber] and [Sales RT 2]? Is the measure [Sales RT 2] same with the previous measure/calculated column [Totals to date]? By the way, you are creating [Totals to date] as measure or calculated column?

I can get the correct result when I use your sample data and formula(see below screenshot)...

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User III

You already have YTD - that is your total.

Announcements

#### Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group