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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
enswitzer
Helper III
Helper III

Cálculo del filtro - DEBE SER NUEVA COLUMNA

Tengo un conjunto de datos por los que voy a querer filtrar (en última instancia, voy a poner este cálculo en una instrucción if para determinar si es overbudget y quiero ser capaz de cortar por la salida roja / amarilla / verde).

Los datos se ven así, y he creado una fórmula (overbudget) que en este momento sólo suma todo por el identificador del proyecto, sin embargo quiero usarlo para decir lo siguiente para cada ID de proyecto:

If (Suma de Gastos (tipo ) > suma de Gastos (tipo - tendencia), "En Plan", "Sobre presupuesto")

Overbudget (CURRENTLY) á Calculate(Sum('PP - Project Status: Spend Chart'[Value]), ALLEXCEPT('PP - Project Status: Spend Chart', 'PP - Project Status: Spend Chart'[Project IDId]))

enswitzer_0-1607955243333.png

Parece que no tengo problemas para hacer esto como medidas, pero quedarme atascado tratando de hacerlo como una nueva columna.

4 REPLIES 4
enswitzer
Helper III
Helper III

@Greg_Deckler

Buscando crear la columna Overbudget pero no como medida.

enswitzer_0-1607956816125.png

No @enswitzer,

Puede crear una medida como se indica a continuación:

Measure = 
var _totalbudget=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Project ID]=MAX('Table'[Project ID])&&'Table'[Expenditure Type]="Target"))
var _totaltrendspend=CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Project ID]=MAX('Table'[Project ID])&&'Table'[Expenditure Type]="Trend"))
Return
IF(_totalbudget>=_totaltrendspend,"On Plan", "Overbudget")

Y verás:

v-kelly-msft_0-1609404493413.png

Para el archivo .pbix relacionado, pls ver adjunto.

Saludos
Kelly

¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

No @enswitzer,

¿Podrían subir su archivo .pbix a una empresa de onedrive y compartir el enlace con nosotros? Recuerde eliminar la información confidencial.

Recuerde agregar sus medidas en el interior.

Saludos
Kelly

¿He respondido a tu pregunta? ¡Marca mi puesto como una solución!

Greg_Deckler
Super User
Super User

@enswitzer Así que dados los datos anteriores, ¿cuál sería esta nueva columna para cada fila?



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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