Forum Discussion
rkottap
2 years agoFrequent Visitor
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...
- 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
tamerj1
Community Champion
2 years agoHi 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