Forum Discussion
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.
Kindly provide the DAX for this.
Thanks in advance.
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 measureCount Using Measure = COUNTROWS(FILTER(VALUES(Sheet1[Product ]),[Measure]>0))Hope this works. IF not please provide more information regading target measure.
Thanks
3 Replies
- qqqqqwwwweeerrrSolution Sage
Hi Anonymous
Please check this solution. Here i have taken sample data with 10 Products with target values.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 sameDid 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
- AnonymousNot applicable
Hi,
Thanks for your response.
But my target is displayed by measure value. Based on the measure we need to take the count.
- qqqqqwwwweeerrrSolution Sage
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 measureCount Using Measure = COUNTROWS(FILTER(VALUES(Sheet1[Product ]),[Measure]>0))Hope this works. IF not please provide more information regading target measure.
Thanks