Forum Discussion
Counting values for measure
Hi I am trying to create the measure that count number of voids where void value is = 0.99p.
However [Voids Volume] and [Voids Value] are measures so calculate function does not want to work.
The end result that I am trying to get would look something like this only it would show them by date for each store filtering in to Clerk ID registed to that store.
I am not sure what modifications need to be made so it would work with the measures.
Thanks.
I found the change to the measure that solved the problem.
Voids99p = CALCULATE(COUNTROWS(filter(Actuals,[Voids Value]=0.99)))
4 Replies
- lbendlinSuper User
Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - Justas4478Post Prodigy
I have solution that almost works.
Voids99p = CALCULATE(COUNT('Product'[SKU Number]),filter(Actuals,[Voids Value]=0.99))
The problem is that when i count based on SKU number(Product number) when there are multiple voids of the same product in a day it counts it as one since all same products have same SKU number. I cant see how else I can change measure so it would count same product voids not as single void.
- ThomasWepplerImpactful Individual
Maybe you have to choose the count option instead of the count (distinct) option.
Just go to build visula in the right side and change what you have selected from count to count (distinct).- Justas4478Post Prodigy
I found the change to the measure that solved the problem.
Voids99p = CALCULATE(COUNTROWS(filter(Actuals,[Voids Value]=0.99)))