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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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.

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.