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
Planted_Baker
Frequent Visitor

Running Total for a Measure

Dear experts,

 

I want to get running total ('Running_Total_Weld'd") for Joints welded on weekly basis in the below table. But unable to get the correct formula. Have tried to look up everywhere but cannot figure it out. Please help if you can.

 

I have created a measure for getting Joints welded as "Weld'd". Formula is below.

I have also tried to make a measure for Running Total of welded joints ("Running_Total_Weld'd") but it isn't calculating the weekly running totals properly.

 

Untitled.png

 

Weld'd = CALCULATE(COUNTROWS(Latest_NDE), Latest_NDE[Weld_Check] = "Y")
Running_Total_Weld'd = CALCULATE(COUNTROWS(Latest_NDE), Latest_NDE[Weld_Check]="Y", Latest_NDE[WELD_DATE] <=MAX(Latest_NDE[WELD_DATE]))

 

 

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

Hi @Planted_Baker ,

Please update the formula of the measure [Running_Total_Weld'd] as below and check if it can return the correct result...

Running_Total_Weld'd =
SUMX (
    GROUPBY ( Latest_NDE, Latest_NDE[Week_Check], Latest_NDE[WELD_DATE] ),
    [Weld'd]
)

 

If the above one can't help you get the desired result, please provide some sample data in your table 'Latest_NDE' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Planted_Baker ,

Please update the formula of the measure [Running_Total_Weld'd] as below and check if it can return the correct result...

Running_Total_Weld'd =
SUMX (
    GROUPBY ( Latest_NDE, Latest_NDE[Week_Check], Latest_NDE[WELD_DATE] ),
    [Weld'd]
)

 

If the above one can't help you get the desired result, please provide some sample data in your table 'Latest_NDE' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Thank you Rena. Unfortunately the formula didn't work as i requried. Taking your advise, i have created a new post (https://community.powerbi.com/t5/Desktop/Running-Totals-and-Charts/m-p/2809790) and have added sample .pbix file in it. Thank you !  

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.