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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (1,866)