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
LuisP03
New Member

Como extender una línea sobre el eje X hasta una línea de referencia sobre este mismo eje

Hola a todos. 

Tengo un conjunto de datos con las siguientes variables: presupuesto ejecutado, presupuesto aprobado, presupuesto estimado final, fecha inicial, fecha final y fecha estimada finalización de un proyecto. Estoy utilizando un gráfico de líneas donde en el eje Y tengo las tres variables de presupuesto y sobre el eje X la fecha de inicio y fecha fin de proyecto. Sobre el eje X creé una línea constante cuyo valor está determinado por una medida del día actual en que se ve el reporte.

 

Al no tener más datos en el rango de fecha que se compone entre fecha de inicio y fecha fin, ya que el presupuesto ejecutado siempre se ve como un único dato a corte del día en que se visualiza el reporte, esta variable sólo me la muestra como un punto. 

 

El resultado que espero es que el presupuesto ejecutado lo muestre como una línea que va desde la fecha de inicio del proyecto hasta la línea constante del eje X que indica la fecha actual en que se ve el reporte.

 

 

LuisP03_0-1708287371995.png

 

Resultado esperado:

LuisP03_1-1708287479830.png

 

 

3 REPLIES 3
v-junyant-msft
Community Support
Community Support

Hi @LuisP03 ,

To achieve the expected result, I would recommend you to follow these steps:

 

Create a Calculated Measure: You need to create a measure that calculates the executed budget up to the current date. This will allow you to have a constant value of the executed budget that can be extended over time. The formula for the measure will depend on how your data is structured, but a basic example might look something like this:

Budget Executed To Date = CALCULATE(SUM(YourTable[BudgetExecuted]), YourTable[Date] <= TODAY())

Be sure to replace YourTable and BudgetExecuted with the actual names of your table and column.

Use the Measure on the Line Chart: Instead of using the executed budget column directly, use the measure you just created on the Y-axis of your line chart. This should allow the executed budget line to extend to the current date.

 

Adjust the X-Axis Display: Make sure the X-axis is set to show the date range from the project start date to the current date. This can be adjusted in the chart's X-axis properties.

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

Please don't use the term "calculated measure".

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.