Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have a table that contains the columns hours & the week number of these hours.
I have a slicer using week number. If I select in the slicer for example -
Weeks 1 to 8
I want to divide the total hours offered in these weeks by 8. (Count of week number)
If I select Weeks 3 to 6 I want to divide total hours offered by 4 etc...
Tried using ALLSELECTED but this doesn't work.
Solved! Go to Solution.
@Qotsa try following measure
Avg =
DIVIDE (
SUM ( Table[Hours] ),
COUNTROWS ( VALUES ( Table[WeekNumber] ) )
)
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.
I agree with the solution above as well. The table shown to the right is the raw data. The slicer limits the number of rows and associated Hours to the MEASURE. If this doesn't work, I'm assuming there's more to your raw data than just these two rows. Can you post a sample please.
FOrrest
Proud to give back to the community!
Thank You!
I agree with the solution above as well. The table shown to the right is the raw data. The slicer limits the number of rows and associated Hours to the MEASURE. If this doesn't work, I'm assuming there's more to your raw data than just these two rows. Can you post a sample please.
FOrrest
Proud to give back to the community!
Thank You!
Perfect. Works a treat. Thanks a million.
@Qotsa try following measure
Avg =
DIVIDE (
SUM ( Table[Hours] ),
COUNTROWS ( VALUES ( Table[WeekNumber] ) )
)
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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 81 | |
| 66 | |
| 50 | |
| 45 |