Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Team,
I need to create a caalculated field using MAXX & IF conditins if text is matching in a columns (Issue Type & Resolution) then add the text value for all the ID's in each row else Add the TEXT value from "Current Status".
Logic:
IF "Issue Type"="Feature" & "Resolution" IN {"Canceled", "Cancelled"} THEN "Cancelled"
EleseIF
IF "Issue Type"="Feature" THEN [Current Status]
EndIF
Please see the attached screenshot for expected "Output" in column "E".
I have tried below DAX, but it's not giving the result for all the rows.
Please giude me to resolve this issue.
DAX:
Output =
CALCULATE(MAXX(FILTER(SUMMARIZE(TableName,
TableName [ID], TableName [Issue Type], TableName[Resolution], TableName[Current Status]),
TableName[Issue Type]="Feature" && TableName[Resolution] = "Canceled" || TableName[Resolution]="Cancelled")), "Cancelled"),
TableName[Issue Type]="Feature")
Screenshot:
Hi @rkottap
Download PBIX file with example below
This works
Output =
VAR _IsCancelled = COUNTROWS(FILTER(ALL('TableName'), 'TableName'[ID] = SELECTEDVALUE(TableName[ID]) && 'TableName'[Issue Type] = "Feature" && 'TableName'[Resolution] IN {"Cancelled", "Canceled"}))
VAR _InProgress = COUNTROWS(FILTER(ALL('TableName'), 'TableName'[ID] = SELECTEDVALUE(TableName[ID]) && 'TableName'[Issue Type] = "Feature" && 'TableName'[Current Status] = "In Progress"))
VAR _Review = COUNTROWS(FILTER(ALL('TableName'), 'TableName'[ID] = SELECTEDVALUE(TableName[ID]) && 'TableName'[Issue Type] = "Feature" && 'TableName'[Current Status] = "Review"))
RETURN
SWITCH(
TRUE(),
_IsCancelled = 1, "Cancelled",
_InProgress = 1, "In Progress",
_Review =1 , "Review"
)
Regards
Phil
Proud to be a Super User!
Thank you for your response!
There are only two IF Conditions.
1:
IF "Issue Type"="Feature" & "Resolution" IN {"Canceled", "Cancelled"} THEN "Cancelled"
2: IF "Issue Type"="Feature" THEN [Current Status]
Second IF condition should give the dynamic result from column "Current Status"?
Thank you
User | Count |
---|---|
98 | |
89 | |
82 | |
70 | |
67 |
User | Count |
---|---|
115 | |
104 | |
101 | |
72 | |
64 |