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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

% Running Total by Max Qty of Filtered Criteria

Hi All, I'm new here

 

I really need your help to create sql syntax in power BI for Running Total %

I only able to create in Pivot Excel (below pic) but found difficulty to create in Power BI

AbimanyuArtha_1-1669023188380.png

 

Below is part of my data 

 

PlantDate DT Description  DT MT 
LTS1-Jun-22Low feed on DSSE27.70
LTS2-Jun-22Mixed bed regen34.00
LTS3-Jun-22Low feed on DSSE38.70
LTS4-Jun-22Low feed on DSSE17.10
LTS5-Jun-22Centrifuge issue20.26
LTS6-Jun-22Centrifuge issue12.00
LTS7-Jun-22Outlet crystallizer blocking7.60
LTS8-Jun-22 2.74
LTS9-Jun-22Actuator valve on autoclave trouble4.28
LTS16-Jun-22Mixed bed regen12.40

 

Really appreciate for the help

 

Thanks and Regards,

Abimanyu

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

Try to create a measure with the code below:

Running Total% =
VAR _CurrentDT = MAX(TableName[DT Description])
VAR _TotalAmt =
CALCULATE(
    SUM(TableName[DT MT]),
    ALL(TableName)
)
VAR _CurrentRT =
CALCULATE(
    SUM(TableName[DT MT]),
     TableName[DT Description]<=_CurrentDT
)
VAR _ratio = FORMAT( DIVIDE (_CurrentRT, _TotalAmt), "0%")
RETURN
_ratio
 
I tried and it works like this:
FreemanZ_0-1669025733061.png

 

View solution in original post

3 REPLIES 3
FreemanZ
Super User
Super User

Try to create a measure with the code below:

Running Total% =
VAR _CurrentDT = MAX(TableName[DT Description])
VAR _TotalAmt =
CALCULATE(
    SUM(TableName[DT MT]),
    ALL(TableName)
)
VAR _CurrentRT =
CALCULATE(
    SUM(TableName[DT MT]),
     TableName[DT Description]<=_CurrentDT
)
VAR _ratio = FORMAT( DIVIDE (_CurrentRT, _TotalAmt), "0%")
RETURN
_ratio
 
I tried and it works like this:
FreemanZ_0-1669025733061.png

 

Anonymous
Not applicable

Thank you very much ^^

daXtreme
Solution Sage
Solution Sage

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.