A CALCULATE SUM DAX question based on latest value

rileybloke

New Member
Joined
Feb 7, 2013
Messages
43
Hi All, banging my head against the desk now, so have to ask the pro's... I have a set of data like this...

Doc NoDoc DateItemQty
101/02/201411110
101/02/201411215
201/02/201411320
201/02/201411110
403/02/201411110
505/02/201411310
606/02/201411110
707/02/201411210
808/02/201411110

<tbody>
</tbody>



I need to sum the qty for each Doc No, by date but only the DocNo with the highest number, ignoring any previous docs.
Thanks
 
Last edited:
Apologize if this is a stupid question but can you say what exactly the 30 is comprised of on 01/02/14. Suspect there is some simple misunderstanding.

Thanks.
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Then you can change the MAX syntax to include that column, something like LatestDocNo=calculate(max(Table1[Doc No]),filter(Table1,Table1[MSGDATE]=earlier(Table1[MSGDATE])))

?
 
Upvote 0
Nicely done Tianbas!I was able to get the desired results with the example data with your approach. Seems Mozartiano addressed the latest twist with a slight tweak.
 
Upvote 0

Forum statistics

Threads
1,215,848
Messages
6,127,275
Members
449,372
Latest member
charlottedv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top