Forum Discussion

android1's avatar
android1
Post Patron
10 years ago
Solved

COUNTROWS using If OR

Hi,

 

How would I modify the following measure - OnTime =
CALCULATE(COUNTROWS ( FILTER ( OTIF, OTIF[ShiftInTime] = OTIF[TimeFrom]*[targetperc OT])))

 

to also multiply by [targetperc OT] if OTIF[ShiftInTime] <> OTIF[TimeFrom]

  • OnTime = 
    CALCULATE(COUNTROWS ( FILTER ( OTIF, OTIF[ShiftInTime] = OTIF[TimeFrom]*[targetperc OT])) + COUNTROWS ( FILTER ( OTIF, OTIF[ShiftInTime] <> OTIF[TimeFrom]*[targetperc OT])) * [targetperc OT]   )

    Something like that?

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion
    OnTime = 
    CALCULATE(COUNTROWS ( FILTER ( OTIF, OTIF[ShiftInTime] = OTIF[TimeFrom]*[targetperc OT])) + COUNTROWS ( FILTER ( OTIF, OTIF[ShiftInTime] <> OTIF[TimeFrom]*[targetperc OT])) * [targetperc OT]   )

    Something like that?

      • android1's avatar
        android1
        Post Patron

        Hi,

         

        When I try to get the percentage of your measure of Total Calls ie. OnTime % = OnTime/Total Calls

        the OnTime% changes to whatever value is selected in the slicer. Any idea why this is? 

         

    • android1's avatar
      android1
      Post Patron

      Hi,

       

      When I try to get the percentage of your measure of Total Calls ie. OnTime % = OnTime/Total Calls

      the OnTime% changes to whatever value is selected in the slicer. Any idea why this is?