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
kormosb
Helper III
Helper III

Rolling Calculation in a different way

Hi,

 

I have trouble solving the following measure.

I would lik to calculate the rolling (cumulative) revenue for one person.

 

My calculation is:  DIVIDE(TOTALYTD([net revenue], 'Date table'[Date]),TOTALYTD([count of employees], 'Date table'[Date]),0)

The way it calculates:

(Net revenue for January/count of employees for January) + (Net revenue for February/count of employees for Febarury) + (Net revenue for March/count of employees for March) + ...

 

Although, this is not what I want. I would like to calculate like this:

Net revenue for January + Net revenue for February + Net revenue for March + ... count of employees for January + count of employees for February + count of employees for March...

 

Can you help me which measure I should use?

 

Thanks a lot!

Kind regards,

Benjamin

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @kormosb ,

You could create variables of TOTALYTD, and then use them to calculate divide.

Measure =
var a =  TOTALYTD ( [net revenue], 'Date table'[Date] )
var b = TOTALYTD ( [count of employees], 'Date table'[Date] )
return
DIVIDE ( a, b, 0 )

If it still doesn't work, can you please share some sample data and the expected results?

 

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
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

1 REPLY 1
v-xuding-msft
Community Support
Community Support

Hi @kormosb ,

You could create variables of TOTALYTD, and then use them to calculate divide.

Measure =
var a =  TOTALYTD ( [net revenue], 'Date table'[Date] )
var b = TOTALYTD ( [count of employees], 'Date table'[Date] )
return
DIVIDE ( a, b, 0 )

If it still doesn't work, can you please share some sample data and the expected results?

 

Best Regards,

Xue Ding

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

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

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.

Top Solution Authors