Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi I have a requirement to show actuals and forcast in a line chart.
the data have 4 categories as below
I need a cumulative line for actuals Data so I have implemented the below measure for the cumulative line
M=CALCULATE(SUM(Table[value]),FILTER(ALL(Table),Table[Date] <= MAX(Table[Date]) && Table[Type]="Actual")).
all the 4 categories values are in single column with another column conditionally created to classify the type.
solution needed:
I want the planned Actuals from the cumulative line to be dotted from the current date where it is a measure
I want the planned Forecast from the Values column to be dotted from the current date where it is a column.
can anyone help me with this.
Solved! Go to Solution.
Hi @sv00001 ,
Please try:
Planned Actuals = IF(MAX('Table'[Date])<=TODAY(),CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date]) && 'Table'[Type]="Planned Actual")))Planned Forecast = IF(MAX('Table'[Date])>=TODAY(),CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date]) && 'Table'[Type]="Planned Forecast")))
Or:
Planned Forecast 2 =
SWITCH(
TRUE(),
MAX('Table'[Date])=TODAY(),[Planned Actuals],
MAX('Table'[Date])>TODAY(),[Planned Forecast]
)
Output:
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi,
The ideal approach should be as follows:
M=CALCULATE(SUM(Table[value]),DATESYTD(Calendar[Date],"31/12"),Table[Type]="Actual")
I have asumed that you want a YTD running total.
Hi @sv00001 ,
Please try:
Planned Actuals = IF(MAX('Table'[Date])<=TODAY(),CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date]) && 'Table'[Type]="Planned Actual")))Planned Forecast = IF(MAX('Table'[Date])>=TODAY(),CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date]) && 'Table'[Type]="Planned Forecast")))
Or:
Planned Forecast 2 =
SWITCH(
TRUE(),
MAX('Table'[Date])=TODAY(),[Planned Actuals],
MAX('Table'[Date])>TODAY(),[Planned Forecast]
)
Output:
Please check the pbix file.
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
IF I use more than 2 && in th measure i dont see any values in the graph
If you're experiencing issues with your DAX measure not displaying values in the graph when using multiple conditions with && (logical AND operator), there could be a few reasons why this might be happening:
Let's say your measure looks like this:
Planned_Actuals =
CALCULATE(
SUM(Table[value]),
FILTER(
ALL(Table),
Table[Date] <= MAX(Table[Date]) &&
Table[Type] = "Planned Actual" &&
Table[SomeOtherColumn] = "SomeCondition"
)
)
Ensure that:
If you're still experiencing issues, you might need to provide more context about your data model, sample data, and the specific DAX measures you're using for further assistance in troubleshooting. Additionally, reviewing the Power BI diagnostic logs or DAX Studio can provide insights into the evaluation of your measures.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
To achieve the requirement of having dotted lines for "Planned Actuals" from the cumulative line and "Planned Forecast" from the values column starting from the current date in Power BI, you can follow these steps:
Create Calculated Columns:
Create Measures:
Line Chart Visualization:
Formatting Dotted Lines:
Conditional Dotted Lines:
Dynamic Dotted Lines from Current Date:
Here's an example of how you might adjust your measures to start from the current date onwards:
Cumulative Planned Actuals =
CALCULATE(
SUM(Table[value]),
FILTER(
ALL(Table),
Table[Date] <= MAX(Table[Date]) &&
Table[Type] = "Planned Actual" &&
Table[Date] >= TODAY() // Adjust as necessary
)
)
Similarly, adjust other measures accordingly.
By following these steps, you should be able to create a line chart with cumulative lines for actuals, planned actuals, forecast, and planned forecast, and format them as per your requirements, though achieving dynamic dotted lines from the current date might require additional considerations or workarounds.
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |