Forum Discussion
IF ALL, Then
I have data that shows help desk tickets. Each ticket has multiple actions which is stored in a table called "Actions" where it lists every action taken within the ticket. One column is "IsAuto" and if there is a -1 it means it is an auto generated action and if it is a 0 then it is not automated action.
I need to find a way to say "IF ALL Actions on a Help desk tickets are automated (=-1), then "automated ticket" else "Not automated ticket"
4 Replies
- parry2kSuper User
May be something clever, thinking loud here. Do sum of all automated IsAuto value of each action of a ticket, and also do the count of actions, if abs(sum) = count of actions it means all tickets were -1 and that means it is "automated ticket".
- bhmiller89Helper V
It didn't work as a column but it rendered properly as a measure:
SelfHealed = IF(DISTINCTCOUNT('dpmgr tblHDActions'[ActionID])=[abssum], "Self Healed", "Not Self Healed")
However, I need to use "Self Healed" vs "Not Self Healed" as a slicer, which I can't do with a measure (to my knowledge)
- OwenAugerSuper User
For a calculated column, something like this should work.
By the way I'm inferring column/table names from your earlier post and guessing there's a TicketID. Please change as needed.
SelfHealed = IF ( CALCULATE ( SELECTEDVALUE ( 'dpmgr tblHDActions'[ActionID] ), ALLEXCEPT ( 'dpmgr tblHDActions', 'dpmgr tblHDActions'[TicketID] ) ) = -1, "Self Healed", "Not Self Healed" )
- v-jiascu-msftMicrosoft Employee