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
miii
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.

 

2019-04-08_15-29-02.png

3 REPLIES 3
v-lili6-msft
Community Support
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.

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

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.
Greg_Deckler
Super User
Super User

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


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

 

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])
return
calculate(
CALCULATE(
[Indirect Labor Actual],
filter(
'Calendar',
and(
'Calendar'[Relative Year Index] = maxyear ,
'Calendar'[Month] <= _month
)
)
),
DATESYTD('Calendar'[Date])
)

 

 

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.