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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
AbimanyuArtha
Frequent Visitor

% 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

 

Thank you very much ^^

daXtreme
Solution Sage
Solution Sage

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.