Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi
I'm trying write a measure to get results back from a table (looking at two columns) which counts only the results which have a number in one or both columns , ignoring anything with '0' in both columns. If I was using excel I would filter out the two columns which have '0' in both cells, leaving me with the columns that have a number in both, or a number in one and '0' in the other. I do not want to include results that have a zero in both columns only. The measure I have written is
Solved! Go to Solution.
Please try this measure out.
= COUNTROWS(FILTER('Cycle Counts','Cycle Counts'[Cycle Count Qty. (Calculated)]<>0 && 'Cycle Counts'[Cycle Count Qty. (Phys. Inventory)]<>0))
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
How do you use this measure to filter out the data?
Please try this measure out.
= COUNTROWS(FILTER('Cycle Counts','Cycle Counts'[Cycle Count Qty. (Calculated)]<>0 && 'Cycle Counts'[Cycle Count Qty. (Phys. Inventory)]<>0))
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Hi Pat
Many thanks, this one worked!
Hi @Anonymous ,
Try it using COUNTX:
Hi- unfortunately I don't know if. this would have worked as the link looked like it was in Spanish. I did get a solution though, and thank you for replying.