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
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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.