caculation between dates??????? please respond!

Miss Rain

New Member
Joined
Aug 12, 2014
Messages
2
well its not precisely calculating the number of days between dates but here we go..

Im new to power pivot and Im uploading everyday a list of trips done by a transportation company, i have no idea of how to calculate the number of trips in every stage, this is the info i have :


[TABLE="width: 500"]
<tbody>[TR]
[TD]trip route[/TD]
[TD]requirementdate[/TD]
[TD]departuredate[/TD]
[TD]arrivaldate[/TD]
[/TR]
[TR]
[TD]los angeles- dallas[/TD]
[TD]08/10/14[/TD]
[TD]08/11/14[/TD]
[TD]08/13/2014[/TD]
[/TR]
[TR]
[TD]los angeles- dallas[/TD]
[TD]08/12/14[/TD]
[TD]08/12/14[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]san francisco-vegas[/TD]
[TD]08/09/14[/TD]
[TD]08/10/14[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]vegas-dallas[/TD]
[TD]08/12/14[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

and here is what i need:
[TABLE="width: 500"]
<tbody>[TR]
[TD]trip route[/TD]
[TD]num of trips in Reqdate[/TD]
[TD]num of trips in Depdate[/TD]
[TD]num of trips in Arrivaldate[/TD]
[/TR]
[TR]
[TD]los angeles- dallas[/TD]
[TD][/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]san francisco-vegas[/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]vegas-dallas[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]



When i just drag the Reqdate o Depdate to the values field i will just give me the count of trips,but i want the trip that is already in the arrival date, not to show in the previous stages.
Im assuming I would do it with dax, but any clue u can provide would be apreciated.

Thanks!
smile.png
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I am concerned you may have used too many ???? in your title. What if you run out!? Do you need some back? :p

Enough snark. There are a bunch of ways to do this. I would probably consider adding a "status" (or whatever you want to call it) calculated column.

= IF (MyTable[ArrivalDate] <> "", "Arrived",
IF (MyTable[DepartureDate] <> "", "Departed",
"Required" ) )

That would let you filter on that status for various things, and in this case it makes it easy to count arrived rows (in a measure):
= CALCULATE (COUNTROWS(MyTable), MyTable[Status] = "Arrived")

There are other "more direct" ways to do this, too.
 
Upvote 0
ahahah but I bet nobody had answered if I wouldnt put so many question marks right there.. so it worked YEII!

HEY thanks for your reply, I got it figured out in a more direct way, but your response gave me an idea of some other things I wanna do. :rolleyes:
 
Upvote 0

Forum statistics

Threads
1,224,034
Messages
6,176,001
Members
452,695
Latest member
Alhassan

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