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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Bhaskar_K1986
Regular Visitor

Help required in Power BI for running total based on value passed

Hi Team,

 

I'm trying to do a running total for a column where I am supposed to add the column values based on the value passed.

 

Demand value= 73593                                                                In excel we have used offset to get this value:                     

value passed =4                                                                          Cumulative sum           '=SUM(OFFSET(B1,1,0,4,1))

Sum of 4 rows value =126463                                                     Cumulative Average    '=Average(OFFSET(B1,1,0,4,1))

 

In Excel, we can get this value by just passing how many rows have to get the sum, but in Power BI I couldn't get that.

 

In the below example Required value is showing 126463 which is the sum of 4 rows based on the value passed is 4. 

Suppose the value passed is 5 then it has to get a sum of 5 rows as the required value, where I could change the sum dynamically.

 

I hope someone would have come across this type of requirement. I need your help in getting the desired results.

Bhaskar_K1986_0-1658153906162.png

 

1 REPLY 1
v-xiaotang
Community Support
Community Support

Hi @Bhaskar_K1986 

Thanks for reaching out to us.

In the above example, I am not sure which is the original data and which is the expected result. So I created a simple example, could you give the expected output according to it? Thanks.

vxiaotang_0-1658392833823.png

 

Best Regards,

Community Support Team _Tang

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.