Forum Discussion
Marcox28
Helper II
4 years agoconvert excel formula to DAX
How can i convert this formula excel in dax ? =IF(ISNUMBER(SEARCH("TEST";S549));"N/A";IF(AND(D549<>"DELETE";D549<>"TRUE";D549<>"REJECTED";L549="1 – TOP";OR(R549="DRAFT";R549="TO APPROVE";R549="TO...
- 4 years ago
Hi Marcox28
Without a sample pbix, it is hard to come up with a correct formula. Assuming the formula is for a calculated column, here is my conversion to DAX:FORMULA = SWITCH ( TRUE (), CONTAINSSTRING ( 'Table'[Column S], "TEST" ), "N/A", NOT 'Table'[Column D] IN { "DELETE", "TRUE", "REJECTED" } && 'Table'[Column L] = "1 - TOP" && 'Table'[Column R] IN { "DRAFT", "TO APPROVE", "TO START" } && 'Table'[Column AO] = 0 && 'Table'[Column BB] <= DATE ( 2022, 1, 1 ), "ON", "OFF" )Note: SWITCH function is kind of a shorthand for multiple IF statements.
amitchandak
Super User
4 years agoMarcox28 , You have similar functions in power bi, you need to add columns name
Can you share sample data and sample output in table format?
Marcox28
Helper II
4 years agono, I only have this formula.😥
cells D549 etc. you can see them as column names