Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Bucketing Value with condition

Hello all,  Im pretty new here, hope to get help from everyone to solve this case.  Dummy table:  Item  Forecast Ttl open order + Shipment Ttl Order - Forecast A 120 175 55 B 220 ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous,

    You can add a calculated column to check these two field values and return tags. Then you can use these fields to create a table visual to achieve your requirement:

    Tag =
    VAR diff = Table[Forecast] - Table[Ttl open order + Shipment]
    RETURN
        SWITCH (
            Table[Forecast],
            diff, "Forecast without orders",
            0, "Zero forecast",
            IF (
                diff = 0,
                "Order = forecast",
                IF ( diff > 0, "Order > forecast", IF ( diff < 0, "Order < forecast" ) )
            )
        )

    Regards,

    Xiaoxin Sheng