Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Goodmorning,
I have created a pivot table with some calculated fields about a trip. In this table I would like to attach the same information about the previous and the following/next trip (via drill-down).
So, I'm looking for a solution to calculate a dimension on a specific field (Tripnumber) that shows the previous and next value, related to that Tripnumber and an other field (Vehicle number). Note the previous Tripnumber is not the Tripnumber - 1 !!
Any suggestions?
Thanks in advance.
Johann
Hi Johann,
you can first organize your table by an "order by", then use in the script previous(Tripnumber) as PrvTripNb to store it in your table.
To get previous and next ,start from 'next' and use previous (previous(Tripnumber)), you get then TripNb as next, previous as current and prev(prev)) as previous
You can then simply use these 3 fields close one to each other
you can use the "above" function in the pivot
here is an quick example
best regards
christian
Hi Christian, this is not exactly what I mean. You used the functions as an expression and not as a dimension.
I need to calculate a dimension with these functions to create this kind of report :
Trip + kilometers, hours etc.
Previous Trip kilometers, hours etc.
( Next Trip kilometers, hours etc.)
Do you have any other suggestions?
Best regards,
Johann
Hej Johann,
can you show me a screen shot of the chart you want please
christian
Christian, I can't show a screenshot, because I don't have the solution yet.
I need some kind of structure (where Trip, Related Trips, Loading Location, Unloading Location and Date/Time are dimensions and Kilometers and Hours are expressions) :
| Trip | Related Trips | Customer | Loading location | Unloading location | Date/Time | Kilometers | Hours |
| 2 | - | A | A | B | 9-9-2010 14:00 | 200 | 5 |
| 1 | B | C | D | 8-9-2010 12:00 | 350 | 7 | |
| 3 | C | E | F | 10-9-2010 8:00 | 600 | 14 |
Note: the main line is Trip 2. From this line I need to show the Previous (1) and Next (3) trip with the info about dimensions and expressions.
Best regards,
Johann
Johann,
I think this will match your needs.
But you'll have to manage previous when it is first as
best regards
christian
Christian,
It's not exactly what I need, but I think I will make a workaround with an other pivot table with other dimensions.
Thanks for your help.
Best regards,
Johann