How to filter on latest version in a table?

Kahler

New Member
Joined
Dec 8, 2014
Messages
2
Hi, I've run into a problem in several cases when using Powerpivot on Business system databases. I've tried Google and searches but no luck..
The problem is when I have multiple versions in the same table with a status date or revision number separating them, and I want to pick the newest for each customer, employee etc.

It can look like this:
EmployeeStatus dateWorktime
Empl 12014-01-12100
Empl 2 2013-04-22100
Empl 22014-08-0180
Empl 32014-02-0350
Empl 32013-04-10100

<tbody>
</tbody>

In Most cases I want a pivot showing me:
Empl 1100
Empl 280
Empl 3100

<tbody>
</tbody>

But it would also be good to be able to filter on a date to get the data from that time so for 2014-07-01:
Empl 1100
Empl 2100
Empl 3100

<tbody>
</tbody>

I hope you understand my problem and have a solution, in my mind it shouldn't be that hard, but cant figure it out!

Thanks
/Rickard
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I think if you make these two measures and then make a pivot table with Employee in the rows and the Work Time measure in values it should work.

MaxDate:=MAX(TabName[Status date])
Work Time:=SUMX(DISTINCT(TabName[Employee]),[MaxDate])
 
Upvote 0
Hi that helps me as far as I get the last date, I get "System.FormatException:" but it seems to work.
But how do I filter my column value based on the date in the measure?
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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