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>


 
Last edited:

FranzV

Board Regular
Joined
Dec 27, 2016
Messages
178
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.
 

Forum statistics

Threads
1,082,342
Messages
5,364,777
Members
400,815
Latest member
gangstar67

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top