Forum Discussion
Need new calc column counting all rows with same value in column but not for entire table
- 7 years ago
Hi zamboni1199,
It seems that you may filter the report with the date slicer.
If it is your case, you could create the calculated column with the measure below.
Column = COUNTROWS ( FILTER ( 'Table1', EARLIER ( 'Table1'[Employee] ) = 'Table1'[Employee] && 'Table1'[Date].[Month] = EARLIER ( Table1[Date].[Month] ) ) )Here is the result output.
If you still need help, please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)
Best Regards,
Cherry
Yes, thank you, here you go:
Here is the filtered data in my report:
Created On Employee Number of Occurrences
1/1/2018 John Doe 43
1/10/18 Jill Smith 17
1/21/18 John Doe 43
The number of occurrences should read 2 for John Doe and 1 for Jill Smith because I'm only showing data that was Created in January of 2018. But the Number of Occurrences is showing the total times John Doe and Jill Smith are listed in the table (from January 2018 through the current date). I just need the Number of Occurrences to match what's showing on my filtered report. Thanks.
Hi zamboni1199,
It seems that you may filter the report with the date slicer.
If it is your case, you could create the calculated column with the measure below.
Column =
COUNTROWS (
FILTER (
'Table1',
EARLIER ( 'Table1'[Employee] ) = 'Table1'[Employee]
&& 'Table1'[Date].[Month] = EARLIER ( Table1[Date].[Month] )
)
)
Here is the result output.
If you still need help, please share a dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.)
Best Regards,
Cherry
- zamboni11997 years ago
Helper II
Thank you, that was great!