Search code examples
powerbidaxpowerbi-desktopmeasure

How can I flatten a set of text data in powerbi


I am using PowerBI to display a set of activities. For example, we capture when we send an invitation, whether is was opened, accepted, and attended. The data comes in with one line per activity, like:

Name Activity
JP Jones Invitation Sent
JP Jones Invitation Opened
JP Jones Invitation Accepted

I've converted the Activity into a True/False

EventIsAccepted = IF ( [Activity] = "Invitation Accepted", "True", "False"
)

The functions work fine, but the output still displays all three lines and I can't collapse them. I can see why this isn't working, but can't think of a way around it.

EDIT:

My current output looks like this:

output with 3 lines

I'd like to have it look like this:

output with 1 line


Solution

  • The following works for me.

    enter image description here

    EventIsAccepted = IF ( "Invitation Accepted" IN  VALUES('Table'[Activity]),   "True", "False"
    )