Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have two columns, one with the date and the other in year-month format, and I want to add a third one that is a counter for each day that goes by, and when it is a new month that it restarts. I was able to do it in total, but not that it restarts per month, and I'm getting very complicated.
Date | Month |
2022/06/01 | 2022/06 |
2022/06/02 | 2022/06 |
... | ... |
2022/06/01 | 2022/07 |
Date | Month | count |
2022/06/01 | 2022/06 | 1 |
2022/06/05 | 2022/06 | 2 |
... | ... | ... |
2022/06/01 | 2022/07 | 1 |
Solved! Go to Solution.
HI @nicolasvc,
You can try to use the following measure formula to get the count based on the current date and current month group:
formula =
CALCULATE (
COUNT ( Table[Date] ),
FILTER ( ALLSELECTED ( Table ), [Date] <= MAX ( Table[Date] ) ),
VALUES ( Table[Month] )
)
Regards,
Xiaoxin Sheng
HI @nicolasvc,
You can try to use the following measure formula to get the count based on the current date and current month group:
formula =
CALCULATE (
COUNT ( Table[Date] ),
FILTER ( ALLSELECTED ( Table ), [Date] <= MAX ( Table[Date] ) ),
VALUES ( Table[Month] )
)
Regards,
Xiaoxin Sheng
Hi we wnat to help but please provide a lot more examples not just 3 dates and take care to avoid typing mistakes
Explain the missing dates. Why does it jump from 22/06/01 to 2022/06/05 ?
And why is 2202/06/01 in month 2022/06 and 2022/07. It does not make sense and looks like typing mistakes.
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 |
---|---|
80 | |
79 | |
59 | |
36 | |
35 |
User | Count |
---|---|
99 | |
57 | |
56 | |
46 | |
40 |