Forum Discussion
Anonymous
4 years agoNot applicable
Calculate function using Containsstring filter not working as expected
Hey Guys, I'm sure I'm missing something small in the syntax here but I've tried this DAX measure about every way possible the past couple days without any luck. I have a table called 'vw_sh...
- 4 years ago
Hi Anonymous ,
Maybe you could try this Measure.
ACT% = DIVIDE ( CALCULATE ( SUM ( vw_shrinkage_act[Total_Hrs] ), FILTER ( vw_shrinkage_act, vw_shrinkage_act[Shrinkage_cat_code] <> "SHIFT" ) ), CALCULATE ( SUM ( vw_shrinkage_act[Total_Hrs] ), CONTAINSSTRING ( vw_shrinkage_act[Shrinkage_cat_code], "SHIFT" ) ) )Then the result will look like this:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
v-cazheng-msft
4 years agoCommunity Support
Hi Anonymous ,
Maybe you could try this Measure.
ACT% =
DIVIDE (
CALCULATE (
SUM ( vw_shrinkage_act[Total_Hrs] ),
FILTER ( vw_shrinkage_act, vw_shrinkage_act[Shrinkage_cat_code] <> "SHIFT" )
),
CALCULATE (
SUM ( vw_shrinkage_act[Total_Hrs] ),
CONTAINSSTRING ( vw_shrinkage_act[Shrinkage_cat_code], "SHIFT" )
)
)
Then the result will look like this:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun