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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
jonnyA
Responsive Resident
Responsive Resident

Divide by the number selected

Hello,

Hoping someone could help me divide the total of the "Average # of Patients Per Shift" by the # of "Shift Names" selected.

For example, I have a "Shift Name" filter in my image.  I need to take the "Average # of Patients Per Shift" divided by the # of Shift Names selected.

 

The 14.60 is taking the "Average # of Patients Per Shift" divided by 6, but I need a formula that will automatically divide by the total # of shifts that are selected.  So, if Client chose 10 shifts then the formula would take "Average # of Patients Per Shift" divided by 10.

 

So, in the image below I need a formula that will take 87.58 divided by the # of shifts selected, which is 5.  87.58 divided by 5 = 17.52.

 

Thank you in advance for your help!

 

jonnyA_0-1633361352580.png

 

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@jonnyA try this measure:

 

Avg = AVERAGEX ( VALUES ( Table[Shift] ), [Your Average Measure] )

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
jonnyA
Responsive Resident
Responsive Resident

@parry2k , that worked thank you so much!

parry2k
Super User
Super User

@jonnyA try this measure:

 

Avg = AVERAGEX ( VALUES ( Table[Shift] ), [Your Average Measure] )

 

Follow us on LinkedIn

 

Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.