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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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