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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
alfertab
Helper I
Helper I

Ver solo un área en un gráfico de areas con dos datos por mes

Hola a todos, he estado teniendo problemas con los gráficos de áreas y me gustaría saber si alguien sabe como resolver algo similar.

Básicamente tengo una tabla como la siguiente:

MesFactura antes del productoFactura despuésAhorro
enero 2024$12,000$7,000$5,000
febrero 2024$12,500$8,500$4,000
marzo 2024$11,000$6,500$4,500

Una vez con esto necesito realizar una gráfica como la siguiente: 

alfertab_0-1709679664854.png

Alguien sabe como realizarlo?

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @alfertab 

 

For your question, power bi may not be able to achieve your goal in the visual it currently offers.

 

I found a similar visual, but it may not be what you want. You can refer to it:

 

vnuocmsft_0-1709691062938.png

 

Or you can consider a custom visualization.

 

Regards,

Nono Chen

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

 

View solution in original post

alfertab
Helper I
Helper I

Hola, muchas gracias por el planteamiento. Logré realizar algo similar a lo que buscaba utilizando matplotlib de python, aquí dejo el código que utilicé por si a alguien le sirve: 

# El código siguiente, que crea un dataframe y quita las filas duplicadas, siempre se ejecuta y actúa como un preámbulo del script: 

# dataset = pandas.DataFrame(Facturación despues mes, Facturación antes mes, Mes-Año)
# dataset = dataset.drop_duplicates()

# Pegue o escriba aquí el código de script:
import matplotlib as mb
import matplotlib.pyplot as plt
import numpy as np

#Hacer bonito el gráfico
mb.rcParams['font.size'] =12
mb.rcParams['text.color'] ="#000000"
mb.rcParams['axes.labelcolor']="white"
mb.rcParams['xtick.color']="white"
mb.rcParams['ytick.color']="white"

#Definir Parámetros
Mes = dataset.loc[:,'Mes-Año'].tolist()
Facturacionantes= dataset.loc[:,'Facturación antes mes'].tolist()
Facturaciondespues = dataset.loc[:,'Facturación despues mes'].tolist()

#Cambiar color de la parte de afuera del fondo
plt.figure(facecolor="#000000")

#Cambiar color de fondo
ax=plt.axes()
ax.set_facecolor("#000000")

#Crear barras
plt.plot (Mes, Facturacionantes, color ="#FFFFFF",linewidth=3)
plt.plot (Mes, Facturaciondespues, color = "#B3B3B3",linewidth=3)
plt.fill_between(Mes,FacturacionLoad,FacturacionNet, color="#FBED1D", alpha=0.85)

#Nombrar ejes
plt.xlabel("Mes")
plt.ylabel("Facturación [MXN]")

#Poner leyendas
plt.legend(["Facturación antes", "Facturación despues", "Ahorro"])

plt.show()

View solution in original post

2 REPLIES 2
alfertab
Helper I
Helper I

Hola, muchas gracias por el planteamiento. Logré realizar algo similar a lo que buscaba utilizando matplotlib de python, aquí dejo el código que utilicé por si a alguien le sirve: 

# El código siguiente, que crea un dataframe y quita las filas duplicadas, siempre se ejecuta y actúa como un preámbulo del script: 

# dataset = pandas.DataFrame(Facturación despues mes, Facturación antes mes, Mes-Año)
# dataset = dataset.drop_duplicates()

# Pegue o escriba aquí el código de script:
import matplotlib as mb
import matplotlib.pyplot as plt
import numpy as np

#Hacer bonito el gráfico
mb.rcParams['font.size'] =12
mb.rcParams['text.color'] ="#000000"
mb.rcParams['axes.labelcolor']="white"
mb.rcParams['xtick.color']="white"
mb.rcParams['ytick.color']="white"

#Definir Parámetros
Mes = dataset.loc[:,'Mes-Año'].tolist()
Facturacionantes= dataset.loc[:,'Facturación antes mes'].tolist()
Facturaciondespues = dataset.loc[:,'Facturación despues mes'].tolist()

#Cambiar color de la parte de afuera del fondo
plt.figure(facecolor="#000000")

#Cambiar color de fondo
ax=plt.axes()
ax.set_facecolor("#000000")

#Crear barras
plt.plot (Mes, Facturacionantes, color ="#FFFFFF",linewidth=3)
plt.plot (Mes, Facturaciondespues, color = "#B3B3B3",linewidth=3)
plt.fill_between(Mes,FacturacionLoad,FacturacionNet, color="#FBED1D", alpha=0.85)

#Nombrar ejes
plt.xlabel("Mes")
plt.ylabel("Facturación [MXN]")

#Poner leyendas
plt.legend(["Facturación antes", "Facturación despues", "Ahorro"])

plt.show()
Anonymous
Not applicable

Hi @alfertab 

 

For your question, power bi may not be able to achieve your goal in the visual it currently offers.

 

I found a similar visual, but it may not be what you want. You can refer to it:

 

vnuocmsft_0-1709691062938.png

 

Or you can consider a custom visualization.

 

Regards,

Nono Chen

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

 

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

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