Convert Excel Formula to DAX compantible

dek8ce

New Member
Joined
Sep 26, 2016
Messages
2
I'm relatively new to PowerPivot and I'm looking to push a large dataset to PowerPivot and would then like to perform various formulas in the background.

I have a relatively intricate excel formula that pulls purchase order information out of a general ledger transaction description. However, sometimes it's there and sometimes it's not. Therefore, I'm getting some weird errors popping up when pushing this formula to DAX. I was wondering if you all could give me a hand in converting it over...

=IF(ISERROR(MID([@Text], (SEARCH("sbb", [@Text])), 10)), (MID([@Text], (SEARCH("hpe", [@Text])), 10)), MID([@Text], (SEARCH("sbb", [@Text])), 10))

It searches for a string (all our POs start with HPE or SBB and are 10 characters long), if there, it returns the next ten characters, and if not leaves it blank. It's the if blank part that I think is holding me up. Ideas?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I assume you are creating a calculated column? If so, I'd do it in power query instead. Pull the data in and use the wizard to add a conditional column, keep adding further 'else' conditions as needed.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,401
Messages
6,124,705
Members
449,182
Latest member
mrlanc20

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