Forum Discussion
ASHIK2025
11 months agoNew Member
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...
- 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 ResultThanks,
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.
bhanu_gautam
Super User
11 months agoASHIK2025 Try using
DAX
Trip Type =
VAR CurrentTripID = [Trip ID]
VAR IsAdhoc =
CALCULATE(
MAX('Table'[Regular / Adhoc]) = "Adhoc",
ALLEXCEPT('Table', 'Table'[Trip ID])
)
RETURN
IF(IsAdhoc, "Adhoc", "Regular")