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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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