cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Frequent Visitor

## One line chart for different calculations

Hi -

I'm looking for a dax measure for a line chart graph to combine multiple values into one line. Currently it's showing each line for one calculation and when a specific month is selected it truns into a dot for that month, but instead I'd like to display a line for previous months and continuation of the same line to reflect forecast.

3 REPLIES 3
Community Support

hi, @miii

Do you mean that when you select one specific month, there are still previous month and next month data in the chart? IF so, you don't need to select any month. When you select one month, other month will be filtered in the visual.

If not your case, please share your sample pbix file and expected output not just the formula of measure.

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Super User

Can you provide an example of data and your current calculation? How are you doing the forecasting?

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Frequent Visitor

Thanks for help Greg - This is the code being used for calculations

```Indirect Labor Budget YTD:=
CALCULATE(
[Indirect Labor Budget],
DATESYTD('Calendar'[Date])
)```
```Indirect Labor Forecast YTD:=
CALCULATE(
[Indirect Labor Forecast],
DATESYTD('Calendar'[Date])
)```
`Indirect Labor Actual YTD:=var maxyear = MAX('Calendar'[Relative Year Index])var _month = MAX(Scenario[SCENARIO_NUM])returncalculate(CALCULATE([Indirect Labor Actual],filter('Calendar',and('Calendar'[Relative Year Index] = maxyear , 'Calendar'[Month] <= _month))), DATESYTD('Calendar'[Date]))`

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Top Solution Authors
Top Kudoed Authors