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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SammyBM
Frequent Visitor

DAX How to Return words in reverse order

Hi 

I have an issue when data is imported from SQL - for example;

I have product description name : 
 BF-12 Fully lugged valve 10"

 

but on power bi its shows like that:

12 Fully lugged valve 10 -BF

 

how can i fix it in power bi show like the original ? 

 

 

3 REPLIES 3
DataNinja777
Super User
Super User

Hi @SammyBM 

You can transform the data using Power Query, but splitting in separate columns by the occurence of "-" and then then merging the columns in your required order.  These can all be done by clicking ribbons in Power Query.  

DataNinja777_0-1715423163244.png

Best regards,

Yeah I thought of that but there hundereds of items not all of them with the same sign - .
I need to revererse the words order in the sentance. 

hackcrr
Continued Contributor
Continued Contributor

Hi, @SammyBM 

If the data has been modified after import, you can use the Power Query Editor to fix it. Open Power BI Desktop and click Convert Data on the left to access the Power Query Editor.
Locate the table containing the Product Description field and click on the field header to open its properties.
In the Format or Data Type section, make sure it's set to text (if it was originally text).
If the data format is still incorrect, you can try to fix it by writing a custom conversion step using the M Query Language. For example, you can use the Text.Combine or Text.Transform functions to recombine or format the text.

 

Best Regards,

hackcrr

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.