March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Thanks
Solved! Go to Solution.
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.
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! 🤠
Hi @Daniel29195 ,
Thank you for your reply. I am getting this error.
The syntax for ')' is incorrect. (DAX(var ds = filter (
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.
You are welcome.
Hi @Ashish_Mathur ,
Thanks you for your quick reply.
The Inventory, Counted and Variance are all measures. I noticed that your measure does not count the zeros correctly. Is it because the Inventory and the Counted have blank values?
You are welcome. If they have blanks, then why did you mention/show 0 in your original post. Try this revised measure
Measure = countrows(filter(Values(Data[Product]),[Inventory]<>blank()&&[Counted]<>blank()&&[Variance]=0))
MEASURE =
SWITCH (
TRUE(),
SUM ( table[inventory] ) = 0
&& SUM ( table[counted] ) = 0, 0,
SUM ( table[variance] ) = 0, COUNTROWS ( table ),
0
)
Proud to be a Super User!
Hi @vanessafvg ,
Thanks for your reply.
The Switch measure does not work at all. Is it because the Inventory, Counted and Variance are all measures in which the Inventory and Counted measures have blank values?
hi, if you need comprehensive help you really need to provide adequate sample data in text form. one can't posssibly consider aall scenarios and you have given limited information.
the quality of the solutions is based on the information given, in data there are so many nuances so being explicit with the information will = a good solution.
also what makes up those measures, is there column data you can provide with the measure code, please provide appropriate dummy data in text form if you can't provide the real thing.
thanks!
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |