- Más nuevo
- Más votos
- Más comentarios
So to start I think you will need to define "previous row" since there is not an inherent relation, but rather based on a columns value like date for example. With that said, you can create a calculated field to compute the running difference of Accumulated Cycles for each Machine ID. if you take the Date Field as the ordering, the below may work as solution:
- Go to the Analysis page and select Analysis from the top menu.
- Select Field Wells.
- On the Field wells pane, select the + Add menu at the top and then choose Add calculated field.
- In the Create calculated field dialog box, for Name, enter a name for the calculated field, like NumberOfCycles.
- In the Formula box, paste the following:
{Accumulated Cycles} -
prevValue(
{Accumulated Cycles},
1,
[ASC],
{Date},
{Machine ID}
)
- Choose Create.
This formula calculates the running difference of Accumulated Cycles for each Machine ID. The prevValue function returns the value of Accumulated Cycles from the previous record as defined by sorting by Date in ascending order within each Machine ID.
Again, this approach assumes that you have data sorted by Date and Machine ID. Also, be aware that this operation can lead to a null value for the first entry of each machine, because there won't be a previous record to subtract from.
Hope this helps!
-Zac
Contenido relevante
- OFICIAL DE AWSActualizada hace 3 años
- OFICIAL DE AWSActualizada hace 2 años
Hi Zac. Thanks for your reply. I tried you solution but there seems to be no prevValue function in AWS Quicksight.