cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
leo_89
Post Prodigy
Post Prodigy

Selecting line graph

Hi there,

 

I am calculating the half-hourly average value using the following measure:

Average power = Average(Table[Power])

 

and plot the information in a line chart:

 

leo_89_0-1620588296400.png

The x-axis contains the time stamp and the y-axis contains the consumption. I want a selection option on the line chart as shown in the following picture (grey area):

 

leo_89_1-1620588527502.png

So that when I select the certain area of a line chart, it gives the difference between the start and end time of the x-axis and also add up the consumption of the selected area. 

I have no idea how to do that. Any help would be really appreicated.

 

 

5 REPLIES 5
Icey
Community Support
Community Support

Hi @leo_89 ,

 

Is this problem solved?

 

If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If not, please let us know and give us more details.

 

 

Best Regards,

Icey

@Icey the problem has not been solved

amitchandak
Super User IV
Super User IV

@leo_89 , With selection you can zoom, I doubt you can get diff.  Try this in tooltip

 

but measure like this can help


var _max1 = maxx(allselected('Date'), Date[Date])
var _min1 = minx(allselected('Date'), Date[Date])
return
calculate([measure], filter('Date', 'Date'[Date] =_max1)) -calculate([measure], filter('Date', 'Date'[Date] =_min1))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

@amitchandak , how do you define [measure]?

Icey
Community Support
Community Support

Hi @leo_89 ,

 

Based on my understanding, the [measure] in the expression of @amitchandak stands for your meausre [Average power].

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors