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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
MrNoob
Helper II
Helper II

Last Value used as line to beat

So I have a line chart and bar chart combo,  The bars are the industry average, then the blue line is my companies performance and the dotted line is a metric we want to beat.  Now the dotted line is a 7 day moving average.  I am wishing to take the last value from 3/6/18 and use that value for the rest of the dates.  To make a straight line all the way across.  What would i insert into my measure to make this so, below is my current measure

 

 

SS = DIVIDE(CALCULATE(SUM(OAG[Total Seats]),OAG[oper_carr]="__"),(CALCULATE(SUM(OAG[Total Seats]),ALL(OAG[oper_carr]))))


SS MA = CALCULATE([SS], DATESINPERIOD('Date'[Date], LASTDATE('Date'[Date]),-7, DAY ) )

 

 

graph.JPG

1 ACCEPTED SOLUTION

Hi,

 

Try this measure

 

=CALCULATE([ss],DATESBETWEEN('Date'[Date],MAXX(ALL('Date'[Date]),'Date'[Date]),MAXX(ALL('Date'[Date]),'Date'[Date])))

 

If this does not work, share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

I am unclear.  Do you want to insert a 4th line (which will be parallel to the X axis) with a value which equates to the value on the last date?

 

Please clarify.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I want to make the black dashed line run parallel to the x axis. whit the value equating to the last value, which in this case is 3/6/2018 value.

Hi,

 

Try this measure

 

=CALCULATE([ss],DATESBETWEEN('Date'[Date],MAXX(ALL('Date'[Date]),'Date'[Date]),MAXX(ALL('Date'[Date]),'Date'[Date])))

 

If this does not work, share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Europe Fabric Conference

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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