Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Raimondas
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])))

 

 

Raimondas_0-1611136976635.png

 

4 REPLIES 4
v-yiruan-msft
Community Support
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.

Hi,

 

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

 

Raimondas_0-1611649517154.png

 

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)...

measure.JPG

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.
lbendlin
Super User
Super User

You already have YTD - that is your total.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.