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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Carlos_Duran03
Regular Visitor

Unificar formulas de lenguaje M

Hola,

 

Espero que me puedan ayudar, tengo los siguiente campos a los que me aplique una serie de transformaciones

fc70d4b8-34e2-424f-8739-fd237bde902c.jpg

Para obtener como resultado lo siguiente:

ae77d273-78c3-4300-aca7-8110329fac46.jpg

Estos son los pasos aplicados

 

f288bad8-995a-4965-9391-854f661f5740.jpg

Este es el editor avanzado:

cafc4784-6d68-421f-bd1d-ffc5d3b9732b.jpg

Habra alguna manera de que se pueda unificar la linea 9 y 10 o 12 y 13 o que lineas se podria unificar para tener una sola formula, o quisas no se puedan unir, espero que me pueda ayudar con esto.

 

Adicional donde podria tomar un curso en español de preferencia o en ingles pero son subtitulos en españos de lenguaje M y DAX

 

Saludos.

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @Carlos_Duran03 ,

 

You can generally remove all of your 'Changed Types' steps and apply the data types during calculation.

For example, line 13 could just become:

~ each Time.From([#"TRAMO - Copia"]) + #duration(0,0,30,0)

and your line 15 could just be:

~ each Text.From([TRAMO]) & "-" & Text.From([Personalizado])

 

Some examples of the functions you can use for this:

Date.From()
DateTime.From()
Time.From()
Text.From()

 

You can then just do a single 'Changed Types' step right at the end of your query before you send to the Data Model.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
Carlos_Duran03
Regular Visitor

Hola @BA_Pete 

 

Me ayudo bastante, gracias

 

No problem, glad it's helped.

Don't forget to give a thumbs-up to any posts that help you 👍

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Carlos_Duran03
Regular Visitor

Hola @BA_Pete,

 

Voy a probarlo y te comento.

 

Saludos

BA_Pete
Super User
Super User

Hi @Carlos_Duran03 ,

 

You can generally remove all of your 'Changed Types' steps and apply the data types during calculation.

For example, line 13 could just become:

~ each Time.From([#"TRAMO - Copia"]) + #duration(0,0,30,0)

and your line 15 could just be:

~ each Text.From([TRAMO]) & "-" & Text.From([Personalizado])

 

Some examples of the functions you can use for this:

Date.From()
DateTime.From()
Time.From()
Text.From()

 

You can then just do a single 'Changed Types' step right at the end of your query before you send to the Data Model.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors