Forum Discussion

Dunner2020's avatar
Dunner2020
Post Prodigy
5 years ago

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:

 

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):

 

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

  • Dunner2020 , 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))

      • Icey's avatar
        Icey
        Community Support

        Hi Dunner2020 ,

         

        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.

  • Icey's avatar
    Icey
    Community Support

    Hi Dunner2020 ,

     

    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