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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
Syndicate_Admin
Administrator
Administrator

GRÁFICO DE COLUMNAS APILADAS AGRUPADAS + Mostrar el último mes de datos

Hola a todos,

Adjunté el archivo de muestra de PBI y adjunté una imagen para mi idea que llegué a dar forma ya escenificada.

Sin embargo, me gustaría usar los datos de 'Col-Type' [CurrentMonth] en lugar de escribir "Mar" como en el dax de muestra proporcionado porque hay un par de docenas de medidas similares que se utilizarán para diferentes gráficos, realmente no puedo actualizar todos y cada uno de ellos cada mes, en su lugar Es mi deseo simplemente cambiar los datos en 'Col-Type' [CurrentMonth].

O Las alternativas para mi idea son muy apreciadas.Screenshot 2022-04-20 at 14.24.59.png

Por favor, ayuda, gracias <33

https://drive.google.com/file/d/128YEVdMEsiBYfMy-R6J4SowibiA-sXoC/view?usp=sharing

OBActual_OB = 
SUMX('Col_Type',
VAR CurrentType = 'Col_Type'[Col_Type]
    Return
            if
            (CurrentType="OB Actual",
            IF  
            (ISFILTERED('ORDER_TABLE'[MONTH])=False(),
            CALCULATE(Sum('obcb'[OB Actual]), 'obcb'[Month] = "mar"),
            FIRSTNONBLANK('obcb'[OB Actual],1)
            )
            )
        )

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Sí, tengo la SOLUCIÓN

No funcionó porque puse la columna CurrentMonth en la misma tabla del mes utilizada para verificar, ahora creé otra tabla sin hacer ninguna relación y la usé en la consulta condicional.

Screenshot 2022-04-21 at 08.58.12.png

OBActual_OB = 
SUMX('Col_Type',
            if
            ('Col_Type'[Col_Type]="OB Actual",
            IF  
            (ISFILTERED('ORDER_TABLE'[MONTH])=True(),FIRSTNONBLANK('obcb'[OB Actual],1),
            CALCULATE(Sum('obcb'[OB Actual]),'obcb'[Month]= SELECTEDVALUE(lastdatamonth[LastMonth]))
            )
        ))

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Sí, tengo la SOLUCIÓN

No funcionó porque puse la columna CurrentMonth en la misma tabla del mes utilizada para verificar, ahora creé otra tabla sin hacer ninguna relación y la usé en la consulta condicional.

Screenshot 2022-04-21 at 08.58.12.png

OBActual_OB = 
SUMX('Col_Type',
            if
            ('Col_Type'[Col_Type]="OB Actual",
            IF  
            (ISFILTERED('ORDER_TABLE'[MONTH])=True(),FIRSTNONBLANK('obcb'[OB Actual],1),
            CALCULATE(Sum('obcb'[OB Actual]),'obcb'[Month]= SELECTEDVALUE(lastdatamonth[LastMonth]))
            )
        ))

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors