DAX/POWERPIVOT Count Number of Values That Contain Certain Text

melq64

New Member
Joined
Aug 21, 2017
Messages
49
Hi,

I've created this dax measure to count the number of values in a column that contain the text "PO BOX"

TotalPOBox:=COUNTROWS(FILTER('DistProfile v1-3',FIND("PO BOX",'DistProfile v1-3'[Dest_Address],,0)>0))

The formula works fine but the value returned (373) is less than the actual number of "PO BOX" values which should be (394).

Here's a sample of the column values in question:

PO BOX 300404
PO BOX 300712
PO BOX 106045
1 LINCOLN AVE
56 MARYLAND RD
33 LANCASTER RD
PO BOX 200453

I'm obviously missing something and would appreciate any assistance.


Thanks
 
I finally figured out the issue. The zipcode column didn't have the leading zeros in powerpivot data model hence the different count totals from the source data. Can't believe I missed that. Thank you once again for your help brawnystaff. Truly appreciate it:)
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,215,134
Messages
6,123,237
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top