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

Filtering data

This may be a simple solution, but since I'm fairly new and struggling with this I figured I'd give this forum a shot.  I have a dataset of work orders.  There are various report pages related to different ways to see these work orders, opened, closed, open currently, etc.  I'm trying to produce a table with the work order detail information ONLY for those work orders which are currently open.  Also, create a measure that reflects how many days they've been open (compared to today).

 

I think I have some of this, but things aren't quite working right.  I have a measure called Currently Open Work Orders:

 

Currently Open Work Orders = CALCULATE([Vehicle Work Orders], 'WorkOrder'[Work Order Status Class] = "OPEN")

which works fine to reflect in the table whether the work order is currently open or not, (1 = currently open).  When I add certain columns to the table, like WO # , it correctly filters to only show those WO which are currently open (=1).

 

 

I also have a measure to calc the days open from the day the WO was reported:

 

Current Open Days = IF(
    WorkOrderEvent[Currently Open Work Orders] = 1,
    SWITCH (
        TRUE (),  
        TODAY () < MAX ( 'WorkOrder'[WO Date Reported] ), -1 * DATEDIFF ( TODAY (), MAX ( 'WorkOrder'[WO Date Reported] ), DAY ),
        TODAY () > MAX ( 'WorkOrder'[WO Date Reported] ), DATEDIFF ( MAX ( 'WorkOrder'[WO Date Reported] ), TODAY (), DAY ),
        0
    ),
    "")

 

This measure works to calculate the days properly, but, when I add this measure to a table with the WO details, like WO #, WO Date Reported, Status, Currently Open Work Orders, it pulls in ALL work orders (instead of just currently open work orders) and those which aren't currently open just have the blank value.  I don't want anything in this table except currently open work orders and the Current Open Days measure would ONLY apply to currently open work orders so I don't know how to reflect that.  Guessing I need to filter somewhere but not sure how to proceed.

 

Any help is much appreciated.

Thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Sample data would really help. That being said, you might want to check out my Quick Measure Open Tickets which might apply in your case: https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364

 

But, if you just want to filter out the nulls, do that in the FILTERS area of your side pane over on the right.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Sample data would really help. That being said, you might want to check out my Quick Measure Open Tickets which might apply in your case: https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/m-p/409364

 

But, if you just want to filter out the nulls, do that in the FILTERS area of your side pane over on the right.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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.