Can you calculate with an entity?

Hi,

you can display entities in a Dataview, but can you also calculate a new value with these entities in an algorithm, as you do with cube values?

We want to multiply a cube value and an entity value within a Dataview. Is this possible in an algorithm?

Kind regards

Tagged:

Accepted Answer

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    50 Answers 500 Comments 250 Likes Fourth Anniversary
    edited November 29 Answer ✓

    Hi @Oliver Röll ,

    this can be done by just multiplying the values. Consider this example

    In the dataview, the calculation is done on the fly …

    You need, of course, to be on the correct level of detail.

    This is the layout of the dataview:

    Best,
    Helmut

Answers

  • Hi Oliver,

    If they are numerical, you can use entity codes or descriptions to make calculations "on the fly" displayed on your dataview. However, you can't directly update a entity value based on the result of a calculation.

    Best Regards,

    Adrien

  • Hi Adrien,

    thank you for the tip.

    The entity values are numbers with decimal places and look like this:

    What would an algorithm have to look like in order to be able to calculate with these entities?

    I need a new column in the Dataview that multiplies an existing cube value by this entity value.

    Entity values are texts, i.e. strings. Is it possible to convert this text into a double value in an algorithm?

    In Java, I would do this as follows:

    Double.parseDouble(string)

    But how does this work in Board, if it is possible at all?

    I have no idea how I could achieve this.

    I would need a simple example here, please.

    Kind regards

    Oliver

  • Helmut Heimann
    Helmut Heimann Employee, Community Captain
    50 Answers 500 Comments 250 Likes Fourth Anniversary

    Hi @Oliver Röll ,

    what was the reason for storing the factor values in an entity, why not use a cube for that?
    That would make things way easier.

    Best,
    Helmut

  • Hi Helmut,

    if I display the data using a cube, a lot of additional rows are displayed, which I then have to filter out again. That's why I came up with the idea of solving this using an entity. This also works wonderfully and is very performant. That we have to be able to calculate with the value came out afterwards. If calculating with the entity doesn't actually work, I'll have to try the cube solution again, but I was hoping that there was also a solution in Board for converting string entities into double values.

    Kind regards

    Oliver

  • Thank you for the example. That's pretty simple, because I can use entities in algorithms just like cubes.

    I could have figured that out myself. Many thanks!