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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Syndicate_Admin
Administrator
Administrator

Instrucción Case o IF en Power Query

Hola a todos

¿Es posible usar una instrucción CASE o IF en Power Query para consultar múltiples condiciones?

Estoy usando la siguiente declaración IF, pero no está capturando la línea "Encrouching Budget".

¿Hay una mejor manera de lograr el resultado deseado?

if [budget_amountcost] = 0 then "No Budget" else if[jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost] < .85 then "Ontrack" else if [jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost] < 1.01 then "Encroaching Budget" else if [jtd_LaborAmountCost_inclUnposted] + [jtd_GL610205AmountCost] / [budget_amountcost] > 1.01 then "Over Budget" else null

Gracias.

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

@Sime

No hay nada de malo en la sintaxis de ese código, así que con algunos datos de sampel es difícil decir por qué no funciona como esperas.

¿Puede proporcionar datos de muestra o su archivo?

Saludos

Phil

Gracias Felipe. La falta de paréntesis fue la causa del problema.

Agradecemos enormemente su ayuda.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

Top Solution Authors