Forum Discussion
android1
10 years agoPost Patron
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_DecklerCommunity 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?
- android1Post Patron
Yes, that works. Great, thank you.
- android1Post 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?
- android1Post 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?