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.
Hello Dax gurus!,
I have the count for each consecutive month in the below screen shot. What i want to get is the values in the Total column. For each consMonth 1,2,3,4....., i want to add up the values in the count column.
May 20 = 1
Jun 20 = 1+1
July 20 = 1 + 1 + 2
Aug and oct or not consecutive months so the total start again in Oct and so on. Here is the output i am expecting:
thanks
Hi,
Total =
VAR ThisStartMonth = 'Table'[Startmonth]
VAR FirstMonth =
CALCULATE (
MAX ( 'Table'[Startmonth] ),
FILTER (
'Table',
'Table'[Startmonth] <= ThisStartMonth
&& 'Table'[consMonths] = 1
)
)
RETURN
CALCULATE (
SUM ( 'Table'[Count] ),
FILTER (
'Table',
'Table'[Startmonth] >= FirstMonth
&& 'Table'[Startmonth] <= ThisStartMonth
)
)
Regards
@aristotle I think you are going to have to start with a resetting counter and that is Cthulhu:
Cthulhu - Microsoft Power BI Community
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 |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |