Greg_Deckler
5 years agoCommunity Champion
Text Duration Conversion
I keep finding uses for this crazy Text to Table pattern. This one converts text durations to numeric values. Didn't know this was a thing but has come up a couple times in a matter of days. I create...
Greg_Deckler
5 years agoCommunity Champion
I revisited this solution after I remembered my Mythical DAX Index. A perhaps more elegant approach to Text to Table if you don't have | characters in your text is this:
VAR __Text = SUBSTITUTE(__SearchText,__Separator,"|")
VAR __Table =
ADDCOLUMNS(
GENERATESERIES(1,__Count,1),
"__Word",PATHITEM(__Text,[Value],TEXT)
)
If you did have | characters in your text, you would have to SUBSTITUTE them out and then SUBSTITUTE them back in for each word which could get a little messy.