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
Anonymous
Not applicable

Trabajar con variables

Hola

Estoy tratando de utilizar la función variable por primera vez y no reconoce la tabla y / o el campo. ¿Funciona, incluso si la tabla no está vinculada.

Aquí hay una copia del pbix

saludos

https://1drv.ms/u/s!At4hIgQFrUxYjVIYRSj6hBaaqoDV?e=NlbuEO

6 REPLIES 6
Pragati11
Super User
Super User

Hola @alepage ,

En el archivo pbix, puedo ver que está creando un cálculo dax en una tabla utilizando la columna de alguna otra tabla.

Solo puede hacerlo cuando estas 2 tablas están relacionadas entre sí.

Gracias

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@alepage, en primer lugar, está agregando una medida y, en una medida, debe usar algún tipo de agregación para usar el nombre de columna que no está haciendo en la medida.

Ahora a su pregunta original, ¿qué está tratando de lograr? Necesita proporcionar un poco más de contexto sobre su pregunta y lo que está tratando de lograr. No necesariamente VARiables siempre son necesarios, depende de lo que usted está tratando de lograr. Poner una pregunta sin contexto es muy difícil de responder.

Lee este post para obtener tu respuesta rápidamente.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

amitchandak
Super User
Super User

@alepage, ¿qué es la función variable?

Anonymous
Not applicable

Me refiero a usar una medida como:

Distribución ?
Fue
Distribución-Interruptor(true(),
'Project info'[NBL] && 'Project info'[BudgetRevenu],"Flat","none")
Distribución RETURN

Hola @alepage ,

No está claro lo que quieres. Usted podría probar esto en primer lugar:

Distribution =
VAR Distribution =
    SWITCH (
        TRUE (),
        MAX ( 'Project info'[NBL] ) <> BLANK ()
            && SUM ( 'Project info'[BudgetRevenue] ) <> BLANK (), "Flat",
        "none"
    )
RETURN
    Distribution

1.PNG

Hay algunos puntos sobre su fórmula:

  • Como dijeron los usuarios anteriores, las medidas deben especificar una agreación como min,max,sum o count, etc. No se admite el uso de columnas directamente.

Distribución ?
Var
Distribución-Interruptor(true(),
'Project info'[NBL] && 'Project info'[BudgetRevenu],"Flat","none")
Distribución RETURN

  • No son de tipo booleano para las columnas "NBL" y "BudgetRevenu". Por lo tanto, debe agregar condiciones para obtener valores constantes que coincidan con la expresión.

Distribución ?
Var
Distribución-Interruptor(true(),
'Project info'[NBL] && 'Project info'[BudgetRevenu],"Flat","none")

Distribución RETURN

  • El nombre de las variables debe ser el mismo que el de la definición.

Distribución ?
Var
DistributionDistribución:Switch(true(),
'Project info'[NBL] && 'Project info'[BudgetRevenu],"Flat","none")

Distribución distribution RETURN

Puede echar un vistazo a los documentos para obtener más información.

Crear medidas para el análisis de datos en Power BI Desktop

Interruptor

Fue

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

Hola @alepage ,

¿Tiene sentido? Si es así, marque la respuesta útil como la solución. Más gente se beneficiará de aquí. Si todavía tiene preguntas, no dude en preguntarnos.

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

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.