Forum Discussion

apeeltyler's avatar
apeeltyler
Frequent Visitor
2 years ago
Solved

Need help adding to my Measure to count Voluntary/Involuntary Terms

I need some help adding in a column to count Voluntary & Involuntary Terminations to the following code.  I will use this as my lookup to determine who is Voluntary/Involuntary.  I'm not sure where I...
  • apeeltyler's avatar
    apeeltyler
    2 years ago

    Hey Anonymous .  Thanks for replying.  I was able to work with a coworker and we came up with this, using 

    NOT CONTAINSSTRING([Vol/Invol], "Involuntary") &&

      So it ended up with this:  (one for Voluntary and one for Involuntary)

     

    Termed EEs Voluntary = 
    IF (
        CALCULATE (
            COUNTROWS (
                FILTER (
                    Roster,
                    NOT CONTAINSSTRING([Vol/Invol], "Involuntary") &&
                    NOT ( ISBLANK ( Roster[Termination Date] ) )
                )
            ),
            USERELATIONSHIP ( Roster[Termination Date], 'Calendar'[Date] )
        ) = 0,
        0,
        CALCULATE (
            COUNTROWS (
                FILTER (
                    Roster,
                    NOT CONTAINSSTRING([Vol/Invol], "Involuntary") &&
                    NOT ( ISBLANK ( Roster[Termination Date] ) )
                )
            ),
            USERELATIONSHIP ( Roster[Termination Date], 'Calendar'[Date] )
        )
    )