Forum Discussion
Anonymous
4 years agoNot applicable
Measure based off numbers
I have a column "sales" in dataset "data" and whether sale was made or not (1 = sales, 0 = no sales)
I am trying to create two measures for "sale" and "no sale"
I tried:
No sale = COUNTROWS(FILTER(data,data[sales] = "0")) but i get an error saying filter is not the correct syntax
this usually works based off text but im not sure how to do it by number
looking through power bi forum found another measure:
No sale = CALCULATE(SUM(data[sales]); FILTER(data; data[sales]=0)))
but get same error for wrong syntax for filter
what would be the correct syntax for this or is my entore measure off for what I am trying to do?
but get same error for wrong syntax for filter
what would be the correct syntax for this or is my entore measure off for what I am trying to do?
Anonymous this should work (whatever you are doing) without any issue.
Take a look here and post the pbix/sample data here for debugging
2 Replies
- smpa01Community Champion
Anonymous this should work (whatever you are doing) without any issue.
Take a look here and post the pbix/sample data here for debugging
- AnonymousNot applicable
Thank you!! Worked beautifully