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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Syndicate_Admin
Administrator
Administrator

Calculate cumulative total per row

Hello good afternoon, I am trying to find a way to get an accumulated of the totals per period for the number of employees I have in my company.

lhreinoso_0-1674084652105.png

To put them in context, for each sector (Operational, Project, Technical Staff) the total number of employees I currently have working is calculated. I have the measurement made as follows.

lhreinoso_1-1674084768118.png

I need you to accumulate the totals that are calculated by period, that is, for the period 2020-01 I have a total of 7 people, for the period 2020-02 I have a total of 12, but I would like you to also add the period 2020-01 and so on.

Any help?

Thanks a lot!

5 REPLIES 5
v-rongtiep-msft
Community Support
Community Support

Hi @Syndicate_Admin ,

Please have a try.

No trabajadores a Fecha=
var fechaComparacion=lastdate(dates[Fecha])
return
calculate(countrows(capacityactual),filter(capacityactual, capacityactual[fecha alta de recurso]<=fechaComparacion&&capacityactual[fecha desafectacin>=fechaComparacion&&date<=earlier(table[date])))

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi, how are you?

I couldn't get to the solution with what happened to me, what I'm trying to do is a matrix like this.

lhreinoso_0-1674096461074.png

I want the totals to accumulate as the periods go by. I attach in a drive also the pbix file to see more details.

https://drive.google.com/file/d/16atjLi2nBUOZ686I0fzUYLFeSvoyLBKF/view?usp=share_link

Thanks a lot!

Hi @Syndicate_Admin ,

Please refer to my pbix file to see if it helps you.

Measure 2 = 
var cur_periodo=FORMAT( SELECTEDVALUE(Calendario[Periodo]),"YYYY-MM")
var cur_aten=SELECTEDVALUE(RRHH[Atención Demanda])
var tmp=FILTER(ALL(RRHH),RRHH[Atención Demanda]=cur_aten&&FORMAT( RRHH[Fecha Alta de Recurso],"YYYY-MM")<=cur_periodo)
return
COUNTROWS(tmp)
// cur_periodo

vpollymsft_0-1674117070384.png

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello again, you know that I was verifying the pbix with the resolution but you know that I am not totaling the values.

lhreinoso_1-1674129971958.png

What I need is to show it in a matrix as I show you there, but if filter for the year does not show me the totals, and another drawback that I am verifying is that the periods if I take out the year filter are shown to me in a disorderly way.

lhreinoso_2-1674130108952.png

This is what you had presented to me but note that although the accumulated is done but with disorderly periods.

Thanks a lot!

Hello again, you know that I was verifying the pbix with the resolution but you know that I am not totaling the values.

lhreinoso_1-1674129971958.png

What I need is to show it in a matrix as I show you there, but if filter for the year does not show me the totals, and another drawback that I am verifying is that the periods if I take out the year filter are shown to me in a disorderly way.

lhreinoso_2-1674130108952.png

This is what you had presented to me but note that although the accumulated is done but with disorderly periods.

Thanks a lot!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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