cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sujitjena
Resolver I
Resolver I

How to get total line in scatter plot

Hi,

I am trying to get an average line through X axis and Y axis for  tow different sets CCI% & Pyramid Index. I have the option of Average in the analytics tab that only throws normal average. However, i want to display the weighted average thats for the total. Not sure if there is another option to include this. Below are screenshots where CCI% in scatter plot is 24.4% which is normal average of the list of clients plotted. What i want to plot is the total line which is 26.0% as per the table. Similarly for Pyramid Index. Any ideas will be very helpful.

 

Total  TableTotal TableScatter PlotScatter Plot

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @sujitjena ,

 

Try to use ALLSELECTED instead of ALL.

Reference line= CALCULATE( [CCI %],ALLSELECTED('Client Name'[Client Name]))

 

 

Best Regards,

Icey

 

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

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

@sujitjena , I doubt there is an option for the weighted average. Please create an idea for that -https://ideas.powerbi.com/ideas/

or vote for existing one.

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

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

In that case making his own measurement and feeding it into the visual for the line should work right ?

dzuurman
Helper I
Helper I

Hi,

 

I believe you should be able to do this by first creating a measurement to hold the weighted average and then selecting that as the measure for the average line in the scatterplot visual itself.

 

dzuurman_0-1603875311373.png

 

@amitchandak : I thought the same but there is no option to select another measure. It selects the two measures used in the graph as default and calculates average based on the filter. See attached screenshot.

Measure.PNG

You are absolutely correct, the only other way I can think of accomplishing this is by inserting a python visual. In that case, you can use python to create a scatterplot and add your lines that way. There are quite a few examples on how to create a scatterplot and add lines using python. I hope you manage to get it working do let us/me know  !

I was able to trick the Average to show weighted average through a measure "Refernce Line" selecting ALL in the filters but i am unable to effect filters based on client on it. Because if i do not use ALL, it doesnt return any value, Any suggestions will be helpful. Below are screenshots of what i did.

 

Reference line= CALCULATE( [CCI %],ALL('Client Name'[Client Name]))

 

Ref LineRef LineCCICCI

Icey
Community Support
Community Support

Hi @sujitjena ,

 

Try to use ALLSELECTED instead of ALL.

Reference line= CALCULATE( [CCI %],ALLSELECTED('Client Name'[Client Name]))

 

 

Best Regards,

Icey

 

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

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.