Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

cumulative sum by semester with restart on July each year

Hello,

 

I need your help to get a line chart with cumulative sum restart on July.

In this exemple, I woul like to have cumul for both colums Obj VPS and Nb_Pers.

In my model I have a table with details of VPS per date and also a created table with Date. 

 

JL8034_0-1671185922473.png

JL8034_1-1671186048634.png

Thanks a lot for your help. 

 

2 REPLIES 2
CheenuSing
Community Champion
Community Champion

Hi @Anonymous ,

 

Your data and visual don't seem to match. 
Can you post proper data and also which column you want to sum up ?

What is the measure you have written , please paste

 

Cheers

 

CheenuSing

 

 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!
Anonymous
Not applicable

Hello @CheenuSing ,

That's normal that the data are not the same because they came from an other table : VPS which is join to a date table.

To have cumulative objective in this chart, I have used this mesure:
_Cumul_VPS = CALCULATE('Mesures'[_Total_VPS_Par_Collab],
DATESYTD('Date'[Date]))

And that refer to this measure : _Total_VPS_Par_Collab = COUNT('VPS'[PersonnesVisiteesID])

 

JL8034_0-1671193776033.png

JL8034_1-1671193891253.png

 

I've created this "objective" new tableto try to get mothly cumulated objectives.

 

JL8034_2-1671194011928.png

Find bellow the measure of this new table : Objectif. 

Objectifs =
var _table=
CALENDAR(
    DATE(2022,1,01),DATE(2022,12,31))
var _table1=
ADDCOLUMNS(
    _table,"Year",YEAR([Date]),"Month",MONTH([Date]))
return
SUMMARIZE(_table1,[Year],[Month])

 

Nb_employés =

var _value=
COUNTX(FILTER(ALL('Requête2'),
YEAR('Requête2'[Fusionné])='Objectifs'[Year]&&MONTH('Requête2'[Fusionné])='Objectifs'[Month]),'Requête2'[N° d'empl.])
return
IF(
    _value=BLANK(),0,_value)
 
Semestres = SWITCH('Objectifs'[Month],1,"S1", 2,"S1",3,"S1", 4,"S1",5,"S1", 6,"S1",7,"S2", 8,"S2",9,"S2", 10,"S2",11,"S2", 12,"S2")
 
Obj_VPS = 'Objectifs'[Nb_employés]/12
 
Nb_Pers_ =
var _value=
COUNTX(FILTER(ALL('VPS'),
YEAR('VPS'[DateVisite])='Objectifs'[Year]&&MONTH('VPS'[DateVisite])='Objectifs'[Month]),'VPS'[PersonnesVisiteesID])
return
IF(
    _value=BLANK(),0,_value)
 

Maybe I don't need to create this new table and I'll get the results I need without it ?


Thanks in advance for your help. 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors