Inserting LEFT into DAX functions for Measure

Sphinx404

Board Regular
Joined
May 2, 2015
Messages
186
Office Version
  1. 365
Platform
  1. Windows
I am trying to pick out a certain word in a measure I am trying to create in Power Pivot and with my unfamiliarity with DAX functions, it's throwing me off.

Hoping there are some experts on here that can help.

Below is my first attempt to find the first 8 characters in the column I am looking at, the first 8 characters being "Assembly"
Code:
=CALCULATE(COUNTROWS(defects),Defects(Defects[Cause Area Description],LEFT(8)="Assembly"))

This comes up with an error. Any ideas?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Cant say i know too much about DAX formulas but id imagine you need the column in there
 
Upvote 0
Something like:

=sumx(values(Table2[Cause Area Description]),if(left([Cause Area Description],8)="Assembly",Table2[Count of Cause Area Description],0))
 
Upvote 0
Nice. Thank you!

Can you answer another?

The first part of my function in GREEN works great. However, when I try to add in the other part in RED, then it goes to hell.

ideas?

Code:
[B][COLOR=#008000]=CALCULATE(COUNTROWS(Defects),Defects[Cause Area Description]=" Assembly - Auger Sub"[/COLOR][/B],[B][COLOR=#ff0000]COUNTROWS(Defects),Defects[Found Area ID]="400")[/COLOR][/B]
 
Upvote 0
This?

=CALCULATE(COUNTROWS(Table2), FILTER (Table2,Table2[Cause Area Description] = "Assembly - Auger Sub" && Table2[Found Area ID] = 400))
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

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