Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
michellepace
Resolver III
Resolver III

Calculated Columns: split by deliminator "value1 - value 2 - "

Good evening, 

Could someone please help me with some nice clean DAX for each of the subsequent columns listed below? 

a.png

Many thanks
Michelle

 

RAW

Split This
Just one value
Sometimes - I have two
And when I am - very lucky - then I can have three

And I can also - have a blank row - like in the above

 

3 REPLIES 3
camargos88
Community Champion
Community Champion

@michellepace ,

 

Try these calculated columns:

Value 1 = 
VAR _index1 = SEARCH("-", 'Table'[Split], 1, 0)
RETURN TRIM(IF(_index1 > 0, MID('Table'[Split], 1, _index1 - 1), 'Table'[Split]))

Value 2 = 
VAR _index1 = SEARCH("-", 'Table'[Split], 1, 0)
VAR _index2 = IF(_index1 > 0, SEARCH("-", 'Table'[Split], _index1 + 1, LEN('Table'[Split]) +1), 0)
RETURN TRIM(IF(_index2 > 0, MID('Table'[Split], _index1 + 1, _index2 - _index1 - 1), BLANK()))

Value 3 = 
VAR _index1 = SEARCH("-", 'Table'[Split], 1, 0)
VAR _index2 = IF(_index1 > 0, SEARCH("-", 'Table'[Split], _index1 + 1, 0), 0)
VAR _index3 = IF(_index2 > 0, SEARCH("-", 'Table'[Split], _index2, 0), 0)
RETURN TRIM(IF(_index3 > 0, MID('Table'[Split], _index2 + 1, LEN('Table'[Split]) - _index3), BLANK()))

 

Capture.PNG



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



michellepace
Resolver III
Resolver III

Thankyou for your reply. Unfortunately I do not have the option of using power query. Only a calculated column via Dax 

AlB
Community Champion
Community Champion

Hi @michellepace 

This is best done in Power Query. Just use the Split Column feature,  By delimiter, and choose "-" as delimiter

Please mark the question solved when done and consider giving a thumbs up if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

SU18_powerbi_badge

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.