Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 @cosm, 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()
User | Count |
---|---|
98 | |
90 | |
77 | |
71 | |
64 |
User | Count |
---|---|
114 | |
97 | |
95 | |
68 | |
65 |