cancel
Showing results for 
Search instead for 
Did you mean: 
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
yingyinr
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 III
Super User III

You already have YTD - that is your total.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

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

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors