Forum Discussion

vandid's avatar
vandid
New Member
6 years ago

DAX does not equal function in measure not filtering

Hello! 

 

Any help with this is greatly appreciated! 

 

My Capital 2019 measure works perfectly. My Expense 2019 measure just replacing the "=" with "<>" is not actually taking out the capital numbers.  I have a table with capital/expense by year and quarter and I need to separate it out into 2 measures.  There are too many expense types to type all of them out so I was hoping to use the dne sign.  What am I doing wrong here??  Any help is greatly appreciated! 

 

Expense 2019 = calculate(sumx('Saving Record Fuel','Saving Record Fuel'[Q1 Ex/Cap]+'Saving Record Fuel'[Q2 Exp/Cap]+'Saving Record Fuel'[Q3 Exp/Cap]+'Saving Record Fuel'[Q4 Exp/Cap]),'Saving Record Fuel'[FiscalYear]="2019",'Saving Record Fuel'[ExpenseType] <> "Capital - IT Hardware & Equipment" || 'Saving Record Fuel'[ExpenseType] <> "Capital - Other Capital Costs" || 'Saving Record Fuel'[ExpenseType] <> "Capital - Property, Plant & Equipment (PP&E)")
 
Capital 2019 = calculate(sumx('Saving Record Fuel','Saving Record Fuel'[Q1 Ex/Cap]+'Saving Record Fuel'[Q2 Exp/Cap]+'Saving Record Fuel'[Q3 Exp/Cap]+'Saving Record Fuel'[Q4 Exp/Cap]),'Saving Record Fuel'[FiscalYear]="2019",'Saving Record Fuel'[ExpenseType]= "Capital - IT Hardware & Equipment"||'Saving Record Fuel'[ExpenseType]= "Capital - Other Capital Costs"|| 'Saving Record Fuel'[ExpenseType]= "Capital - Property, Plant & Equipment (PP&E)")

 

1 Reply

  • I think I solved my own problem... For the expense measure, I just needed to use AND && instead of OR || when excluding the capital types. 

     

    [insert face palm emoji]