Forum Discussion

ASHIK2025's avatar
ASHIK2025
New Member
11 months ago
Solved

need to create column to fill the data

i have a table like this  Sl No Trip ID Regular / Adhoc 107 77655 Adhoc 107 77655   107 77655   70 77592   70 77592   70 77592    two type of data in 3rd colum...
  • ajaybabuinturi's avatar
    11 months ago

    Hi ASHIK2025,

     

    To achieve this you need to create calculated column as below

    Trip Type = 
    Var TripAdhoc =
    CALCULATE(
        MAX('Table'[Regular / Adhoc]),
        FILTER('Table', 'Table'[Trip ID] = EARLIER('Table'[Trip ID]))
        )
    Var Result = IF(TripAdhoc = "Adhoc", "Adhoc", "Regular")
    RETURN
    Result

     

    Thanks,
    If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.