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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NCato
Frequent Visitor

Need to create a count measure that excludes one specific text string.

My scenario is that I have warehousing picking data that picks up a worker ID if our employees use a handheld RF device to do the work.  The column contains 8 digit worker ID's, and for any that didn't utilize the RF device, it reads "Manually Picked".

I was trying something like this, but I don't know the syntax for the NOT argument.  Or, if anyone has  amore elegant solution, I'm all ears.

RF Device Line Count =
CALCULATE (
     COUNT(PBI_PickingJourLines[WORKERID]),
     NOT PBI_PickingJourLines[WORKERID] "Manually Picked"
)
1 ACCEPTED SOLUTION
CoreyP
Solution Sage
Solution Sage

Try replacing not with "does not equal" so,

 

RF Device Line Count =
CALCULATE (
     COUNT(PBI_PickingJourLines[WORKERID]),
     PBI_PickingJourLines[WORKERID] <> "Manually Picked"
)

View solution in original post

6 REPLIES 6
CoreyP
Solution Sage
Solution Sage

Try replacing not with "does not equal" so,

 

RF Device Line Count =
CALCULATE (
     COUNT(PBI_PickingJourLines[WORKERID]),
     PBI_PickingJourLines[WORKERID] <> "Manually Picked"
)
NCato
Frequent Visitor

I'm getting this error and a broken visual.  Do I need to lean on one of the other COUNT types?

2019-12-18_16-18-56.jpg

try using COUNTROWS instead

NCato
Frequent Visitor

I tried COUNTA, and it worked.  What's the benefit of using COUNTROWS?

I'm not smart enough to know that. If it works, I use it. Haha. Maybe once I learn more.

Actually...I just looked into it.

 

COUNTA counts number of values in a column, COUNTROWS counts the number of rows in a table. So, if your table had blanks, COUNTA would not include them, whereas COUNTROWS would. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.