Hi, I'm A bit new in powerpivot and DAX and i've been trying to achieve the following without much success:
Say I have a powerpivot table wit the following columns and I want to ascertain the time elapsed from order to order (DateTime) for a specific item (Obj_ID)
For example substracting the DateTime of Item 1832 change #2 (order before last) from DateTime of the same item Change #5 (Last order), And so on and so on.
What would be the DAX syntax
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]OBJ_ID[/TD]
[TD]DateTime[/TD]
[TD]Change #[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]5[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]4[/TD]
[TD]Recieved[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]3[/TD]
[TD]Suggested[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]2[/TD]
[TD]ORdered[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]1[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]5[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]4[/TD]
[TD]Suggested[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]3[/TD]
[TD]Suggested[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]2[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
<tbody>
</tbody>[/TD]
[TD]1[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Say I have a powerpivot table wit the following columns and I want to ascertain the time elapsed from order to order (DateTime) for a specific item (Obj_ID)
For example substracting the DateTime of Item 1832 change #2 (order before last) from DateTime of the same item Change #5 (Last order), And so on and so on.
What would be the DAX syntax
[TABLE="width: 500, align: left"]
<tbody>[TR]
[TD]OBJ_ID[/TD]
[TD]DateTime[/TD]
[TD]Change #[/TD]
[TD]Status[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
3/3/2015 9:22:30 AM |
<tbody>
</tbody>
[TD]5[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
3/2/2015 3:53:32 PM |
<tbody>
</tbody>
[TD]4[/TD]
[TD]Recieved[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
3/2/2015 3:45:23 PM |
<tbody>
</tbody>
[TD]3[/TD]
[TD]Suggested[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
2/22/2015 4:14:43 PM |
<tbody>
</tbody>
[TD]2[/TD]
[TD]ORdered[/TD]
[/TR]
[TR]
[TD]1832[/TD]
[TD]
2/22/2015 4:14:05 PM |
<tbody>
</tbody>
[TD]1[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
4/16/2015 9:13:01 AM |
<tbody>
</tbody>
[TD]5[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
3/26/2015 10:25:06 AM |
<tbody>
</tbody>
[TD]4[/TD]
[TD]Suggested[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
3/26/2015 10:24:47 AM |
<tbody>
</tbody>
[TD]3[/TD]
[TD]Suggested[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
3/25/2015 1:11:20 PM |
<tbody>
</tbody>
[TD]2[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD]1899[/TD]
[TD]
3/23/2015 3:08:00 PM |
<tbody>
</tbody>
[TD]1[/TD]
[TD]Ordered[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]