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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MuthalibAbdul
Helper II
Helper II

Weekly average of a string column based on category instances

So I have a table with patient name, which physician has seen and when. I need to be able to count the number of patients seen per physician (which is achievable by simply using a table). However, now I need to do a weekly average of this number. 

 

Furthermore, if a physician has joined midway say June 2nd week, I want the average to start calculating from then moving forward. Otherwise the average would assume a 0 for weeks before the physician even joined the company. 

 

Please let me know if a sample data set would help. Thanks

7 REPLIES 7
danextian
Super User
Super User

Hi @MuthalibAbdul 

Aside from the sample data, how do you determine which date belongs to which week?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

if not please see below snapshot

 

MuthalibAbdul_0-1737833454288.pngMuthalibAbdul_1-1737833526542.png

 

https://drive.google.com/drive/folders/1thOs4dn7vDKtqWD_1Z4mGpXeyE3XsKEh?usp=sharing

 

Check sample data and dashboard, We have date of service when the patient was seen. I create a calender table and link the dates in both tables to get me my weekly numbers

rajendraongole1
Super User
Super User

Hi @MuthalibAbdul  -Can you please share sample data as well with expected output, it helps to analyze and share the result quickly.   as per above information, you need to create DAX logics to build the same. . 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





MuthalibAbdul_4-1737833611518.png

 

 

MuthalibAbdul_2-1737833545025.png

Hi,

In the Calendar table, create a week number column.  To your Matrix visual, drag Year and week number to the column labels and Physician to the Row labels.  Write this measure

Measure = counta(Data[Physician])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

https://drive.google.com/drive/folders/1thOs4dn7vDKtqWD_1Z4mGpXeyE3XsKEh?usp=sharing

 

Please let me know if you have access to this excel and pbix file

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.