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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Syndicate_Admin
Administrator
Administrator

Combinar un gráfico de dos líneas con una línea de tiempo diferente

Tengo un plan de envío de enero a mayo y también los datos de efectivo recibidos de febrero a junio (suponiendo un período de crédito de 30 días después del envío). Ahora, en realidad, ha sucedido que algunos de los despachos del mes de abril pueden prepararse y enviarse en febrero. Por lo tanto, el efectivo recibido por esos artículos es real, es decir, Fecha de desp + 30 días. es decir, en marzo. Ahora, si quiero trazar ambos gráficos en el valor acumulado, la escala de tiempo es diferente para ambos valores. Entonces, cómo mostrarlos bajo un gráfico

MesDesp PlanDesp acumulativo
Ene2020
Feb1535
Estropear3065
Apr 2590
Mayo10100
TOTAL100
3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

@abhi_kothekar ,

Estos son los pasos que puede seguir:

1. Crear tabla calculada.

Table2 =
CALENDAR(
    DATE(
        2023,1,1),
        DATE(
            2023,12,31))

vyangliumsft_0-1683103141634.png

2. Crear tabla calculada.

True =
var _table1=
SUMMARIZE(
    'Table2','Table2'[Year],'Table2'[Month],
    "Cumulative1",
SUMX(
    FILTER(ALL('Table'),
    YEAR('Table'[Desp Plan])='Table2'[Year]&&
    MONTH('Table'[Desp Plan])='Table2'[Month]),[Planned Value]),
    "Cumulative2",
SUMX(
    FILTER(ALL('Table'),
    YEAR('Table'[Desp Actual])='Table2'[Year]&&
    MONTH('Table'[Desp Actual])='Table2'[Month]),[Desp value]))
var _table2=
ADDCOLUMNS(
    _table1,"Cumulative Plann",
    IF(
        [Cumulative1]=BLANK(),BLANK(),
    SUMX(FILTER(_table1,[Year]=[Year]&&[Month]<=EARLIER([Month])),[Cumulative1])))
return
ADDCOLUMNS(
    _table2,"Cumulative Desp",
     IF(
        [Cumulative2]=BLANK(),BLANK(),   
    SUMX(FILTER(_table1,[Year]=[Year]&&[Month]<=EARLIER([Month])),[Cumulative2])))

vyangliumsft_1-1683103141636.png

3. Resultado:

vyangliumsft_2-1683103200798.png

Saludos

Liu Yang

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Syndicate_Admin
Administrator
Administrator

DescripciónDesp PlanValor planificadoDesp ActualDesp value
Assy 1ene-23100ene-23100
Assy 2ene-23150mar-23150
Assy 3feb-23100feb-23100
Assy 4mar-23140feb-23140
Assy 5mar-23130abr-23130
Assy 6abr-2390TBD
Assy 7Mayo-2380TBD
Assy 8jun-23150TBD
Assy 9jun-23130TBD
Assy 10jun-23125TBD

Véase la tabla anterior. Ahora quiero trazar un gráfico de líneas acumulativo para planificado vs real.

Syndicate_Admin
Administrator
Administrator

Sírvase proporcionar una explicación más detallada de lo que pretende lograr. ¿Qué has probado y dónde estás atascado?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.