Forum Discussion

rkottap's avatar
rkottap
Frequent Visitor
2 years ago
Solved

Create calculated field using MAXX with Multiple IF conditions

Hi Team,   I need to create a caalculated field using MAX & IF conditins if text is matching in a columns (Issue Type & Label) then add the text value for all the ID's in each row. Logic: IF "Iss...
  • tamerj1's avatar
    2 years ago

    Hi rkottap 

    Please try

    Output =
    VAR CurrentIDTable =
    CALCULATETABLE ( TableName, ALLEXCEPT ( TableName, TableName[ID] ) )
    VAR FeatureTypeRecord =
    FILTER ( TableName, TableName[Issue Type] = "Feature" )
    VAR FeatureLabel =
    MAXX ( FeatureTypeRecord, TableName[Label] )
    VAR Result =
    SWITCH (
    FeatureLable,
    "Pilot_Phd", "Pilot",
    "Testing", "Test",
    "Check", "Control",
    "BAU"
    )
    RETURN
    Result