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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
VMorris
New Member

Add to line chart: # of records for each unique combo of timepoint/intervention group

I have a longitudinal dataset tracking participants' scores on several validated measures across multiple time points. Participants are assigned to one of two groups. I have created line charts to show changes in participants' average scores over time (example in screenshot 1). However, when hovering over a specific dot (group/time point combo) on any visual, I would like to have it display the number of records used to calculate that score. Can anyone help me to do this?

 

VMorris_0-1706193451174.png

 

My temporary solution has been to create a stacked bar chart showing participants per group by timepoint (screenshot #2). However, this is not ideal because not every participant at each timepoint completes all measures. E.g., there may be 26 participants in the Intervention group at the 3 Mo. Post-Injection timepoint, but only 23/26 may have completed the PROMIS Anxiety measure. 

VMorris_1-1706193812764.png

 

 

1 ACCEPTED SOLUTION

Hi @VMorris 
You can generate a custom tooltip, according to your needs.
1. Create a measure for the desired output of  your n:

n = "(n= " & COUNTROWS('Table')&")"
2 . On another page design the wanted tooltip.
i made mine from table + circles :
Ritaf1983_0-1706340530433.png

3 . format the page as a tooltip and for the needed size (according to the visual)

Ritaf1983_1-1706340620504.pngRitaf1983_2-1706340651770.png

4. modify the tooltip type from the graph and hide the page

Ritaf1983_3-1706340728641.pngRitaf1983_4-1706340758305.png

Result:

Ritaf1983_5-1706340795696.png

PBIX is attached

more information about customized tooltips here:

https://www.youtube.com/watch?v=cGpBUJpFWrM&t=12s

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
VMorris
New Member

Hi @Ritaf1983 

 

Table with sample data below. Desired outcome is a data element that can be added to the tooltip so that when end-users hover over a datapoint in the line chart, the number of participants used to calculate the average AKPS score is shown (example screenshot below). Or the number of participants could be it's own line at the bottom of the tooltip. Thanks!

 

VMorris_2-1706298477350.png

 

event_nameStudy Armsakps_sumscore
Pre-interventionIntervention70
Post-interventionInterventionnull
Post-interventionControl53
Follow-upControl93
Pre-interventionControl73
Follow-upIntervention100
Follow-upIntervention84
Post-interventionIntervention95
Pre-interventionControl94
Post-interventionControl81
Pre-interventionControl68
Post-interventionIntervention100
Post-interventionIntervention97
Post-interventionIntervention75
Post-interventionControl67
Post-interventionIntervention58
Post-interventionControl84
Pre-interventionControl69
Post-interventionControl95
Post-interventionControl79
Post-interventionControl77
Pre-interventionIntervention86
Pre-interventionIneligible55
Follow-upIntervention98
Pre-interventionIntervention77
Post-interventionControl88
Pre-interventionIntervention87
Pre-interventionControl79
Post-interventionControl97
Post-interventionControl69
Follow-upControl88
Follow-upControl75
Pre-interventionControl62
Post-interventionIntervention90
Post-interventionIntervention89
Post-interventionControl69
Pre-interventionControl73
Follow-upIntervention71
Follow-upControl73
Follow-upControl73
Pre-interventionIntervention59
Post-interventionControl89
Follow-upControl72
Pre-intervention071
Pre-interventionIntervention83
Pre-interventionControl90
Follow-upControl52
Follow-upInterventionnull
Pre-interventionIntervention71
Pre-interventionControl87
Pre-interventionControl74
Post-interventionIntervention60
Follow-upControl99
Post-interventionControl90
Pre-interventionControl71
Pre-interventionIntervention70
Pre-interventionIntervention63
Pre-interventionControl62
Pre-interventionControl59
Post-interventionIntervention96
Pre-interventionIntervention90
Post-interventionControl87
Post-interventionControl65
Pre-interventionInterventionnull
Pre-interventionIntervention86
Follow-upControl61
Follow-upControl89
Pre-interventionIntervention95
Pre-interventionIntervention76
Follow-upIntervention76
Pre-interventionIntervention89
Follow-upIntervention65
Pre-interventionControl61
Pre-interventionControl75
Post-interventionControl60
Pre-interventionIneligible70
Post-interventionIntervention76
Follow-upControl98
Post-interventionIntervention78
Post-interventionIntervention80
Pre-interventionIntervention69
Follow-upControl93
Post-interventionControl73
Post-interventionControl70
Post-interventionIntervention85
Pre-interventionIntervention59
Follow-upIntervention82
Pre-interventionControl56
Pre-interventionInterventionnull
Pre-interventionIntervention62
Pre-interventionControl74
Pre-interventionControl57
Follow-upIntervention91
Pre-interventionIntervention78
Follow-upIntervention86
Pre-interventionIntervention57
Follow-upIntervention82
Pre-interventionControl67
Pre-interventionControl85

Hi @VMorris 
You can generate a custom tooltip, according to your needs.
1. Create a measure for the desired output of  your n:

n = "(n= " & COUNTROWS('Table')&")"
2 . On another page design the wanted tooltip.
i made mine from table + circles :
Ritaf1983_0-1706340530433.png

3 . format the page as a tooltip and for the needed size (according to the visual)

Ritaf1983_1-1706340620504.pngRitaf1983_2-1706340651770.png

4. modify the tooltip type from the graph and hide the page

Ritaf1983_3-1706340728641.pngRitaf1983_4-1706340758305.png

Result:

Ritaf1983_5-1706340795696.png

PBIX is attached

more information about customized tooltips here:

https://www.youtube.com/watch?v=cGpBUJpFWrM&t=12s

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

 

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
Ritaf1983
Super User
Super User

Hi @VMorris 

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors