Forum Discussion
IF OR when using COUNTROWS
I feel your OR suggestion (the last one) should do what I need.
However, when I apply this to a slicer (OT %) and change the values, the results are not changed in the relevant columns.
I have a similar slicer called IF % which does change column values when a different option is selected.
Both use measures.
Here is my project -> https://www.dropbox.com/s/6ajjnyotics8vx9/OTIF%20Slicer%20Dilemma%20V2.0.pbix?dl=0
I checked your data, the reason why the OT %won’t work, is because your measure having issue calculating OT(+ 15 -15):
OT(+15-15) =
COUNTROWS ( FILTER ( OTIF, OTIF[Punctuality] = "On Time" ) )
[On time] is a measure, and should be write in a format of [On Time], which is the only measure that uses the OT % column; and OTIF[Punctuality] is in text type, when comparing those two values, it will generating errors under the visuals.
I think you might need to re-consider how to calculate the OT(+15-15) value here.
- android110 years agoPost Patron
Hi Charlie Lao,
I've changed my OT measure to OT(+15-15) =
CALCULATE(COUNTROWS ( FILTER ( OTIF, OTIF[ShiftInTime] = OTIF[TimeFrom]*[targetperc OT]||OTIF[ShiftInTime] <> OTIF[TimeFrom]*[targetperc OT] )
))Data still not changing when value selected in OT slicer. I was sure this would work.
https://www.dropbox.com/s/r5uuuchxj1dx4zv/OTIF%20Sample.pbix?dl=0