Excel Power Pivot Dax Formula

gheyman

Well-known Member
Joined
Nov 14, 2005
Messages
2,332
Office Version
  1. 365
Platform
  1. Windows
I have a table (PivotTable1) where I want to add a measure.

I want to count the number of times a part number appears in one of my Fields (COMP_PART_ID). When I search the internet all I am seeing is PowerBI Dax examples (and not for a Count or CountIf type of formula.

Any help would be appreciated.


I tried
=CALCULATE(COUNT(BOM[COMP_PART_ID]), ALL( BOM[EndItem]))

I Got this when I checked the Formula:
This formula is invalid or incomplete: 'Calculation error in measure 'BOM'[f9ae642d-4ed3-4f0d-95a6-ac06588a12d0]: The function COUNT takes an argument that evaluates to numbers or dates and cannot work with values of type String.'.
 
Last edited:

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Just to add, if this was a regular Excel my formula would be countif([COMP_PART_ID],G7) if I was putting the formula in cell G7
 
Upvote 0

Forum statistics

Threads
1,213,517
Messages
6,114,089
Members
448,548
Latest member
harryls

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