array functions in powerpivot

maring28

New Member
Joined
Jul 24, 2013
Messages
18
Hi,

Can I use array functions in powerpivot as I used to in excel?? and I'll explain:

I have a table: re-fueling dates, month(of re-fueling dates) and carID
I need to indicate the maximum date for each month and car.

Like in the table:
for the car 1057875, the last re-fueling date is 28/04/2013.
I used to use array functions for this calculation but in powerpivot I didn't find any suitable option to do so... :confused:

[TABLE="width: 341"]
<tbody>[TR]
[TD]carID[/TD]
[TD]re-fueling date[/TD]
[TD]month[/TD]
[TD]desired outcome[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]04/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]07/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]10/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]14/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]17/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]21/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]24/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1057875[/TD]
[TD]28/04/2013[/TD]
[TD]4[/TD]
[TD]28/04/2013[/TD]
[/TR]
[TR]
[TD]1266273[/TD]
[TD]04/05/2013[/TD]
[TD]5[/TD]
[TD]27/05/2013[/TD]
[/TR]
[TR]
[TD]1266273[/TD]
[TD]11/05/2013[/TD]
[TD]5[/TD]
[TD]27/05/2013[/TD]
[/TR]
[TR]
[TD]1266273[/TD]
[TD]17/05/2013[/TD]
[TD]5[/TD]
[TD]27/05/2013[/TD]
[/TR]
[TR]
[TD]1266273[/TD]
[TD]27/05/2013[/TD]
[TD]5[/TD]
[TD]27/05/2013[/TD]
[/TR]
</tbody>[/TABLE]

Thanks very much!!
Marina
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Should a car that is listed on multiple months always show the last date of that month? If so, you may try this as a calculated column:
=calculate(max(carrefuel[re-fueling-date]);
filter(
all(carrefuel);
carrefuel[car id]=earlier(carrefuel[car id]) &&
carrefuel[month]=earlier(carrefuel[month])))


You may read about the earlier-function that is the key of this solution here: The Correct Usage of EARLIER() « PowerPivotPro
 
Upvote 0

Forum statistics

Threads
1,223,953
Messages
6,175,598
Members
452,658
Latest member
GStorm

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