Forum Discussion

baneworth's avatar
baneworth
Helper III
5 years ago
Solved

Problem creating a measure with Filter or Containsstring

Dear all,

 

I created several graphs with different Filters using Calculate(sum(...)) DAX.

For my last graph i have to Filter out several BULK Hours, which is where i am facing a problem.

 

You can think of it as many Productnames (lets call it A,B,C,D,....) and the BULK ID's (PRDSUP-Altus, PRDSUP-Depo, PRDSUP-Flex,....).

 

I have to create a measure where i filter out all of the PRDSUP-***.

 

Current DAX i wrote as follows:

Non Productive Work = CALCULATE(SUM(EmployeeHours[TimeValueHour]),
     Filter(TaskCategory,TaskCategory[CategoryName]="Non-Productive Work" || TaskCategory[CategoryName]="Administrative"),
     FILTER(vwLPR,vwLPR[PRODUCT]<>"PRDSUP-Altus" || vwLPR[PRODUCT]<>"PRDSUP-Depo" || vwLPR[PRODUCT]<>"PRDSUP-         FSeries" || vwLPR[PRODUCT]<>"PRDSUP-Coronus" || vwLPR[PRODUCT]<>"PRDSUP-Upgrade"))/
    CALCULATE(SUM(EmployeeHours[TimeValueHour]))

 

I know that by using Containsstring i can use"PRDSUP*" to get everything related to that, but i can not use <> or maybe -.

Pretty sure there is an easier way to get what i want.

 

Appreciate everyone's time.

 

Best regards

2 Replies