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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
TBSST
Frequent Visitor

Getting Average based on count of surveys to number of unique ID's broken down into Months of engage

Hi all, 

 

Sorry for the long title! wasnt sure how else to break this down. 

 

So i have 3 tables that have relationships between them as shown below. The third table shows what a tables look like once i put them in a table in a visuliation. 

Table 1  Table2   Combined Table 
ClientIDClientStartClientEndSurveyIDDateCompletedSurvey Type Client IDSurveyIDEngagement(months)
a1/01/2023 11/01/2023y a11
b1/01/2023 21/01/2023y b21
c1/01/2023 31/01/2023y c31
d1/01/2023 41/01/2023n d41
e1/01/20231/02/202351/01/2023y e51
f1/01/2023 51/01/2023n f61
   71/01/2023y a71
   81/01/2023y a81
   91/01/2023n b91
   101/01/2023y c101
   111/01/2023y d111
   121/02/2023y f122
   131/02/2023y e132
   141/02/2023n e142
   151/02/2023y a152
   161/02/2023y d162
   171/02/2023y e172
   181/02/2023y f182
   191/02/2023n a192
   201/02/2023y c202
   211/03/2023y d213
   221/03/2023y a223
   231/03/2023y b233
   241/03/2023y d243
   251/03/2023n a253
   261/03/2023y a263
   271/03/2023y c273
   281/03/2023y d283
   291/03/2023y f293
   301/03/2023y f303

 

What i am trying to get is getting the average number of surveys done by a client ID's for a Card visutaion, one card showing the average between engagement months (Calculated by Datediff of client start and datecompleted) between 1-2months, then 3+ months. I want to exclude all of the 'n' survey Types. I also have the clientend date. This is because if i client does not complete a survey in a month they are still engageed, i would like it to count as a 0 in purposes of  the average (such as client 'b' who did not do a survey in the 2nd month of engagement). This is also for the purpose to not include the client if they have ended, for the purpose they do not count towards the average if they have not completed a survey outside of the enddate. The first card will show the average number of surveys completed by a client for the first two months, then the second card will show me the average of surveys completed by a client from 3 months and onward. 

 

an extra criteria i need is I have a filter on the report that filters by datecompleted for other visulations. i need the datecompleted in this card to not be impacted by this filter. 

 

I do not have access to creating new tables or power query (due to how the orgaisation has set up security of data). I need this done through Measures. 

 

Thank you for any support on this request. 

 

1 REPLY 1
Anonymous
Not applicable

Hi @TBSST ,

Based on your sharing sample, I think you want to create two card visuals that show the average engagement time for different months. One card is for January and February, and the other card is for any month that has an average engagement time greater than or equal to March. To do this, you need to filter the data by survey type, and then calculate the difference between the date completed and the end date for each survey. You only want to keep the surveys that have a difference of less than one month. Finally, you need to apply a date filter to select the months you want to compare. Is this correct?

If yes, please provide more details about your data, such as the client end, the survey ID and the client ID relationships. If no, please clarify your question below. I hope this helps.

 

In order for you to solve the problem faster, you can refer to the following documentation

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

Best Regards,

Albert He 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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