apply function for specific element DAX

Addora

New Member
Joined
Jan 4, 2014
Messages
11
Hello!, Please I ask fro support in applying function for specific element DAX.

I Have a column called LOB, contains 11 elements "Criteria"

LOB
Business
Golden Customers
NC
Reapers
TEData-Sales
TEData-Sales "Subscription"
WE
Xceed-UP Q
Xceed-Basic
Xceed-Sales

<tbody>
</tbody>

I need to create a measure called AHT, but to be specified based on LOB, e.g

For Below LOBs I need to Use measure: AHT:=(((([Sum of ACD Time]+[Sum of ACW Time]+[Sum of Hold Time])-[Sum of ACWOUTOFFTIME])/86400)/[Sum of ACD Calls])

Business
Golden Customers
NC
Reapers
TEData-Sales
TEData-Sales "Subscription"
WE

<tbody>
</tbody>

but for below LOBs I need to apply this function to the same measure

AHT:=((([Sum of ACD Time]+[Sum of ACW Time]+[Sum of Hold Time])/86400)/[Sum of ACD Calls])

Xceed-UP Q
Xceed-Basic
Xceed-Sales

<tbody>
</tbody>


Capture_5390.png
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You can solve this using a Lookup Table and a Calculated Column. Try the following steps:

  • Add a table to your data model with LOB values that require the first measure.
    • I will call it FirstMeasureCriteria and it only has one column: LOB.
  • Add a calculated column to your original table called RequiresFirstMeasure with the formula:
    • = CONTAINS( FirstMeasureCriteria , FirstMeasureCriteria[LOB] , YourTable[LOB] )
    • This will return TRUE if the LOB in the current row context can be found in the lookup table.
  • Create one measure for each different calculation and name them FirstAHT and SecondAHT.
  • Create the AHT measure that chooses between the two:
    • AHT:= IF( VALUES( YourTable[RequiresFirstMeasure] ) , [FirstAHC] , [SecondAHC] )

I hope it helps.
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,179
Members
448,871
Latest member
hengshankouniuniu

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