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
jackjamesbaker
New Member

How to count rows where a value is reached in a week.

Not sure if my question makes sense but here we go...

 

I have a system where hours are logged against people each day. I want a way to show all records where a persons hours are greater than 20 in any week. The only measure I can get working doesn't seperate weeks, and just shows anyone with hours over 20, which is everyone. 

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, @jackjamesbaker 

According to your description, I can roughly understand your requirement, I think that if you want to make the measure separate weeks, you can just place the [Week] column into the table chart or into a slicer and change the measure like this:

Count = CALCULATE(COUNT('Table'[Person]),FILTER(ALL('Table'),[Hours]>=20&&[Week]=SELECTEDVALUE('Table'[Week])))

Then you can create a card chart and a slicer to place them like this:

v-robertq-msft_0-1623054325063.png

 

And you can get what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @jackjamesbaker 

According to your description, I can roughly understand your requirement, I think that if you want to make the measure separate weeks, you can just place the [Week] column into the table chart or into a slicer and change the measure like this:

Count = CALCULATE(COUNT('Table'[Person]),FILTER(ALL('Table'),[Hours]>=20&&[Week]=SELECTEDVALUE('Table'[Week])))

Then you can create a card chart and a slicer to place them like this:

v-robertq-msft_0-1623054325063.png

 

And you can get what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Jihwan_Kim
Super User
Super User

Hi, @jackjamesbaker 

I am not sure if I understood your question correctly, but I think you need to filter the context of which week you want to show.

Do you want to show this week's result or last week's result? Or, do you want to show every week's result? I think you can achieve this by having a proper dim-date table with a week-column.

Please share your sample pbix file's link here, then I can try to look into it to come up with a more relevant solution.

Thanks.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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