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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
guilherme_gq
Helper I
Helper I

Cumulative value Based in other Measure

Hi!

I trying to calculate a Average Headcount (basically is the sum of Monthly HeadCount / number of months). The Monthly HeadCount is the measure that calculates a total value for the month.

 

for example:

 

                                      SET   OUT  NOV  DEZ    JAN
Monthly HeadCount    400   430   450    445    480
Average Headcount     400   415   427    431    441

 

 

  • October is (430 + 400)/2.
  • For November, is (450+430+400)/3.

 

 

does anyone have any idea how to calculate this measure?

 

Thanks!

2 ACCEPTED SOLUTIONS
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @guilherme_gq,

 

I would suggest you create a date table if you don't have one. Please check out the demo in the attachment.

Measure =
CALCULATE (
    AVERAGEX (
        SUMMARIZE ( 'Table', 'Calendar'[MonthNum], "v", [Monthly HeadCount] ),
        [v]
    ),
    FILTER (
        ALL ( 'Calendar' ),
        'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
            && 'Calendar'[Date] <= MAX ( 'Table'[Date] )
    )
)

Cumulative_value_Based_in_other_Measure

 

Best Regards,

Dale

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

View solution in original post

v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @guilherme_gq,

 

Could you please mark the proper answer as a solution?

 

Best Regards,
Dale

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

View solution in original post

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @guilherme_gq,

 

Could you please mark the proper answer as a solution?

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @guilherme_gq,

 

I would suggest you create a date table if you don't have one. Please check out the demo in the attachment.

Measure =
CALCULATE (
    AVERAGEX (
        SUMMARIZE ( 'Table', 'Calendar'[MonthNum], "v", [Monthly HeadCount] ),
        [v]
    ),
    FILTER (
        ALL ( 'Calendar' ),
        'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
            && 'Calendar'[Date] <= MAX ( 'Table'[Date] )
    )
)

Cumulative_value_Based_in_other_Measure

 

Best Regards,

Dale

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

Thanks, man!!!

 

that worked!!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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