Forum Discussion
Oros
2 years agoPost Prodigy
COUNT rows with filter
Hello, How do you create a measure to COUNT many rows have zeros (in the VARIANCE column), but excluding the zero IF INVENTORY=0 and COUNTED=0 In the example below, the measure should o...
- 2 years ago
Hi,
Assuming Inventory, Counted and Variance are measures that you have written, write this measure
Measure = countrows(filter(Values(Data[Product]),[Inventory]<>0&&[Counted]<>0&&[Valiance]=0))
Hope this helps.
Daniel29195
2 years agoCommunity Champion
measure =
var ds =
filter (
tabl_name,
tbl_name[inventory_col_name] + tbl_name[counted_col_name] = 0 && tbl_name[variance_col_name] = 0 )
return countrows(ds)
let me know if this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
Oros
2 years agoPost Prodigy
Hi Daniel29195 ,
Thank you for your reply. I am getting this error.
The syntax for ')' is incorrect. (DAX(var ds = filter (