The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
79 | |
73 | |
39 | |
30 | |
28 |
User | Count |
---|---|
108 | |
99 | |
55 | |
49 | |
45 |