Forum Discussion

rolopezteteruk's avatar
rolopezteteruk
Frequent Visitor
3 years ago
Solved

Summarise table Streaming dataset

Hello! -Need some help with getting a KPI. -Working with a Streaming dataset so I can't create tables. -I've got a dataset that looks like this: -In the movement column 1=in, 0=out. -Only ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi rolopezteteruk,

    You can try to use the following calculate column formula on your table to get 'type of ship' based on the current 'Place' and 'Date':

    formula =
    VAR maxDate =
        CALCULATE (
            MAX ( Table[DATE] ),
            FILTER ( Table, Table[PLACE] = EARLIER ( Table[PLACE] ) )
        )
    RETURN
        IF (
            Table[Date] = maxDate
                && Table[MOVEMENT(IN/OUT)] = 1,
            Table[TYPE OF SHIP],
            ""
        )

    Regards,

    Xiaoxin Sheng