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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
anabianco09
Helper II
Helper II

Count of events in a week

Hi all, 

I am trying to come up with a measure to count how many events I have in each week of each year :

anabianco09_0-1695988401539.png

How can I use the CALCULATE or COUNT function?

 

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi.

As mentioned - try to create a new measure 

Number of events = COUNTROWS()

, and add that measure to a table visual. Add the week number as well. 

 

Did that solve your problem?

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi.

As mentioned - try to create a new measure 

Number of events = COUNTROWS()

, and add that measure to a table visual. Add the week number as well. 

 

Did that solve your problem?

Anonymous
Not applicable

Hi.

Try adding your existing columns Year and Week of the Year.
Then create a measure:

Number of events = COUNTROWS()

 
See if that works for your specific problem.
If not, provide some information so it easier to the columns in your data model, and which you want to count.
Also, sample data with desired result can also be useful.


Kind regards

anabianco09
Helper II
Helper II

Hi @Anonymous, sorry I sent the wrong measure:

anabianco09_0-1695992762236.png

I do Have the week of YEAR and I want to count how many for each week number of each year... do you have a final measure for that?

Anonymous
Not applicable

Hi @anabianco09 

 

How do you want your final table to be displayed?

Assuming you want a table with the following columns

- Week number

- Number of events

 

One way to define a measure that counts the the number of rows is:

Number of events = COUNTROWS()

 

If you do not have either a date table or a column that holds information of week number -> you can create a calculated column that extracts Week Number from your column Cdate by:

Weeknumber = WEEKNUM(CDate)

 

The result looks like this (note - not your original data)

cosm_0-1695992468236.png

 

Hope this solves your problem.
If so, considering mark as solution so it is easier for other user to find the answer to similar questions.

Kind regards

Hi, I want a table exactly like this and I already have the weeknumber column. 

What would be the rest of the calculation for this: ? do I need to include any other parameter? Number of events = COUNTROWS()

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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