Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi all,
I am having an issue getting the correct formula using COUNT. My scenario is that I have a column of dates and I want another column that counts the occurence of the same date cummulatively but distinctly for different dates. Example below:
I think the measure I have written so far would just confuse things but I am using COUNT and FILTER. Any help would be much appreciated.
Thanks,
Tom
Solved! Go to Solution.
Hi @Tom_pbi ,
Please add the Index column in Power Query Editor.
Then create the column or measure.
Column = COUNTROWS(FILTER('Table','Table'[Date] = EARLIER('Table'[Date]) && 'Table'[Index] <= EARLIER('Table'[Index])))Measure = COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Date] = MAX('Table'[Date]) && 'Table'[Index] <= MAX('Table'[Index])))
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Tom_pbi ,
Please add the Index column in Power Query Editor.
Then create the column or measure.
Column = COUNTROWS(FILTER('Table','Table'[Date] = EARLIER('Table'[Date]) && 'Table'[Index] <= EARLIER('Table'[Index])))Measure = COUNTROWS(FILTER(ALLSELECTED('Table'),'Table'[Date] = MAX('Table'[Date]) && 'Table'[Index] <= MAX('Table'[Index])))
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! This worked perfectly. I originally solved it using this method (https://www.youtube.com/watch?v=-3KFZaYImEY&t=47s) but I prefer this easier cleaner solution.
Bumping this if anyone would be able to give some advice. Thanks!
You should be able to get this by summing your occurence field (value in screenshot). The first table is the sample you provided and the table on the right is just telling the value field to display as a sum.
You can also do this with count but it will basically just count the # of times a date appears with a value.
Thanks but I think maybe I wasn't clear. The value field in your above screenshot is what I want to get, I don't need a sum of those values.
Ah! You provided an example of what you're trying to achieve.. Can you send an example of your current data? You mention there are a column of dates, you're just trying to count them in succession?
I'm not sure how to copy and paste data in here but it is exactly as the screenshot I provided. I have a list of dates and I want to count them as shown in the image - cummulativley for each successive occurence of the same date. But starting from 1 in the case of each new date.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 37 | |
| 35 | |
| 34 | |
| 27 |
| User | Count |
|---|---|
| 136 | |
| 99 | |
| 73 | |
| 66 | |
| 65 |