0
votes

I need to return the last action name using a sequence ID. I must also repeat this for each customer ID within the formula using DAX. I also want to exclude "N/A" as a possible answer.

Sample Data

Regarding the desired output, it will probably be best calculated as a measure. Additionally, I can't segment by customer by simply placing "Customer ID" as the rows for a table. I need the measure to actually repeat the output for each customer ID so I can get three counts (annually, quarterly, and monthly).

1
Could you post the expected output? as a table perhapsmxix
I wrote it in the last column as "Desired Output" I just merged the cells since it's probably going to need to be a measure.Sebastian Hubard

1 Answers

0
votes

This measure should work:

=
VAR a =
    CALCULATE ( MAX ( Data[Sequence] ), Data[Action] <> "#N/A" )
RETURN
    CALCULATE ( VALUES ( Data[Action] ),  Data[Sequence] = a )

enter image description here