Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

Product Counts Based on Measure Values

Hi All,

 

I am new to Power BI. We need to count the products based on target values.

The Product count should contain target values.

In the screenshot, we have 16 products but the expected count is 15.

 

nanbandinesh19_0-1704510851744.png

Kindly provide the DAX for this.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Ok check this one, 
Here i have created one random measure.

Measure = SUM(Sheet1[Target])*AVERAGE(Sheet1[Column])
 
And taking count using below image by creating new measure 
Count Using Measure = COUNTROWS(FILTER(VALUES(Sheet1[Product ]),[Measure]>0))

qqqqqwwwweeerrr_0-1704518104044.png

Hope this works. IF not please provide more information regading target measure.
Thanks

View solution in original post

3 REPLIES 3
qqqqqwwwweeerrr
Super User
Super User

Hi @Anonymous 

Please check this solution. Here i have taken sample data with 10 Products with target values.

qqqqqwwwweeerrr_0-1704517033787.png

Here i have 8 poduct value haveing target greater than 0 so count should be 8. And here i have created the measure 

Product Without Zero Target = calculate(count(Sheet1[Product ]),Sheet1[Target]>0)
And here is the output for the same 
qqqqqwwwweeerrr_1-1704517120106.png

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem


If it does not help, please provide more details with your desired output and pbix file with privacy information (or some sample data).

 

Best Regards

 




Anonymous
Not applicable

Hi, 

Thanks for your response.

 

But my target is displayed by measure value. Based on the measure we need to take the count.

Ok check this one, 
Here i have created one random measure.

Measure = SUM(Sheet1[Target])*AVERAGE(Sheet1[Column])
 
And taking count using below image by creating new measure 
Count Using Measure = COUNTROWS(FILTER(VALUES(Sheet1[Product ]),[Measure]>0))

qqqqqwwwweeerrr_0-1704518104044.png

Hope this works. IF not please provide more information regading target measure.
Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.