Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi all,
I am trying to come up with a measure to count how many events I have in each week of each year :
How can I use the CALCULATE or COUNT function?
Thanks in advance
Solved! Go to Solution.
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?
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?
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
Hi @Anonymous, sorry I sent the wrong measure:
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?
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)
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()
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
36 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |