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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
goatman
Frequent Visitor

Filtering total Run hours by status Running and or Not Running

I am using table below to create graphs of Total run hours sliced or filtered by Running Pumps and Not Running Pumps. I have used variuos DAX expressions but dont seem to get it.

-I need to see pumps that are currently running with their cumulative running hours since installation as long as they are still running  or in service.
- I also need to see pumps that are no longer running and their cummulative run hours or achived life. 

I have used the following expressions but not yielding correct result.

1. 

    Runnining Pumps(measure) =
      CALCULATE(SUM('Multistage Pumps'[OP Hrs]),'Multistage Pumps','Multistage Pumps'[Status]="Running"&&'Multistage            Pumps'[Entry Date]>=TODAY()-5) +[2022-Legacy Hours]
2. 
Not Runnining Pumps =
    CALCULATE(SUM('Multistage Pumps'[OP Hrs]),'Multistage Pumps','Multistage Pumps'[Status]="Not Running"&&'Multistage Pumps'[Entry Date]>=TODAY()-5) +[2022-Legacy Hours]
- Days (Day) run to end of month
-I am using entry date >= today to get the current running pumps.
-Some pumps have legacy hours hence the add.
goatman_2-1683698054038.png

 

goatman_0-1683696767181.png

 

goatman_1-1683696767372.png

 

 

 

Would you please help slice the data using status-"Running" and Status- "Not Running"

 

2 REPLIES 2
Anonymous
Not applicable

Hi @goatman ,

 

You want to dynamically display the results that are running and not running, right?

Try the slicer.

Slicers in Power BI - Power BI | Microsoft Learn

 

You can modify it to the following measure and keep one.

    Runnining Pumps(measure) =
      CALCULATE(SUM('Multistage Pumps'[OP Hrs]),FILTER(ALLSELECTED('Multistage Pumps'),'MultistagePumps'[Entry Date]>=TODAY()-5) +[2022-Legacy Hours]....

 

 

Best Regards,

Stephen Tao

 

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

Hi @Anonymous ,

Thank you for the quick response. Unfortunately, when i try to excute the DAX command, i am getting an error

"A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed."

and what do you mean when you say keep one, i dont seem to get it.

Kind Regards,

@goatman 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.