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
You would need to calculate the total accumulated by months and years of a value but that is between two segmented dates (start and end) and that when the year changes it starts from 0.
I have that to this extent and it works well.
But I want to put additionally in the measure and without creating a segmentation that makes me the calculation between two specific dates. A specific start date and a specific end date in the same column (Date A).
Example pbix attachment.
Solved! Go to Solution.
Hi, @Syndicate_Admin ;
You could try it.
Cumulative measure =
IF (
ISINSCOPE ( 'Sheet1'[Year] ),
CALCULATE (
SUM ( Sheet1[Value] ),
FILTER (
ALL ( Hoja1 ),
Hoja1[Fecha_A] <= MAX ( Hoja1[Fecha_A] )
&& Sheet1[Year] = MAX ( Sheet1[Year] )
)
),
SUM ( Sheet1[Value] )
)
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Syndicate_Admin ;
You could try it.
Cumulative measure =
IF (
ISINSCOPE ( 'Sheet1'[Year] ),
CALCULATE (
SUM ( Sheet1[Value] ),
FILTER (
ALL ( Hoja1 ),
Hoja1[Fecha_A] <= MAX ( Hoja1[Fecha_A] )
&& Sheet1[Year] = MAX ( Sheet1[Year] )
)
),
SUM ( Sheet1[Value] )
)
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Syndicate_Admin , Try using allselected
CALCULATE(SUM(Sheet1[Value]),FILTER(ALLselected(Hoja1),Hoja1[Fecha_A]<=MAX(Hoja1[Fecha_A]) && Sheet1[Year]=MAX(Sheet1[Year])))
Also, you can force like this example
Cumm Sales =
var _max = maxx(allselected(Date),Date[Date])
var _min = mainx(allselected(Date),Date[Date])
return
CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('Date'),'Date'[date] <=max('Date'[date]) && 'Date'[Date] >=_min && 'Date'[Date] <=_max ))
Using allselected() worked for me. Thank you so much!
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 |
---|---|
72 | |
71 | |
55 | |
38 | |
31 |
User | Count |
---|---|
71 | |
64 | |
64 | |
49 | |
45 |