cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
chelsweigandt
Regular Visitor

Traducción de instrucciones SQL a Power Query

Tengo esta consulta SQL que tiene dos instrucciones en ella. La primera instrucción es directa, pero luego está separada por un OR a la segunda instrucción que tiene una instrucción AND. No puedo averiguar cómo traducir esto en Power Query sin que PBI combine las instrucciones.

Aquí está la instrucción SQL original:

seleccione I.INVENTORYID, I.SKU, b.BRANDNAME, I.MPN, I.SHORTDESCRIPTION, I.BINLOCATION, I.INSTOCK, I.INACTIVE
de inventario i marcas internas de unión b en i.BRANDID á b.brandid
donde isnull(i.INSTOCK,0) <> 0
o (i.BINLOCATION no es null y isnull(i.INACTIVE,0) á 0)
pedido por i.BINLOCATION, i.SKU

El o & y que están en negrita y subrayado son lo que estoy teniendo problemas con.

¿Puede ayudarme con la comprensión de cómo hacer estas declaraciones en PBI.

¡Gracias!

4 REPLIES 4
Greg_Deckler
Super User
Super User

@chelsweigandt - ¿No puede usar simplemente el modo avanzado del conector SQL para pegar simplemente el código SQL?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler cuando hago eso, recibo este error

error.PNG

Hola @chelsweigandt ,

Si desea realizar los pasos del Editor de consultas después de obtener los datos, puede seguir estos pasos:

https://powerbi.microsoft.com/en-us/blog/pull-data-from-sql-server-with-power-bi-designer/

Agradecería Kudos si mi respuesta fue útil. También agradecería que marcara esto como una solución si resolviera el problema. ¡Gracias!




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

Proud to be a Datanaut!
Private message me for consulting or training needs.




@collinq ¡Eso funcionó! ¡Muchas gracias! Tuve que sacar el último bit de la instrucción SQL(pedido por i.BINLOCATION, i.SKU) pero una vez que lo hice, funcionó perfectamente. Muchas gracias

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors