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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
limabravo
Regular Visitor

Filtering Issue

Hello,

I would be grateful if anyone could help with the following problem.

 Oct2018_pic2.png

In the above report, the FMS_WO_table stores events affecting assets. Each row contains details about the event including the affected asset, event datetime, event type (see below). The “DaysSincePrevEvent” column is only populated for Event Type = 2 rows.

Oct2018_pic3.png

I would like to filter the FMS_WO_table based on the populated values in the “DaysSincePrevEvent” column but retain all the Event Type = 1 rows associated with the asset. In the table above for example, filtering based on DaysSincePrevEvent < 10 should yield the following result:

 Oct2018_pic4.png

In the above example, one of the Asset 1 Event Type = 2 records are kept and the only Event Type = 2 record for Asset 2 is kept. Asset 3 has no Event Type = 2 records and is not present in the filtered results.

My attempt at implementing this filter has involved creating a temporary duplicate of the FMS_WO_table (temptable) where the “DaysSincePrevEvent” is set to 999 for all the records with Event Type = 1. I have then created two list tables, one containing all unique values of “DaysSincePrevEvent”, the other containing a list of unique datetimes (Datetime_FWO) (to allow filtering over a specific date range). These list tables are used in Slicers and are related to the event tables as depicted above. The other relationships to note are:

AssetTable[EQUIP_NO] to temptable[EQUIP_NO], 1:Many, Bi-directional

AssetTable[EQUIP_NO] to FMS_WO_table[EQUIP_NO], 1:Many, single direction

In the example above when filtering for DaysSincePrevEvent < 10, the temptable Event Type = 2 records do consequently filter the AssetTable via the bi-directional relationship. I would then expect the FMS_WO_table to be filtered based on the Equipment Number (indirectly via the temptable filtering) and the DaysSincePrevEvent < 10 (which should show all the Event Type = 1 records for the asset plus those Event Type = 2 records where DaysSincePrevEvent < 10).

In practice, I’m finding that the AssetTable is being filtered correctly but filtering of the EQUIP_NO in the FMS_WO_table does not seem to be working – there are additional assets listed in the FMS_WO_table which is not expected.

Any help would be much appreciated.

Many Thanks

Regards,

Lloyd

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@limabravo,

 

You may just add a measure.

Measure =
VAR d =
    MAX ( Table1[DaysSincePrevEvent] )
RETURN
    IF (
        SELECTEDVALUE ( FMS_WO_table[DaysSincePrevEvent] ) < d
            && CALCULATE (
                DISTINCTCOUNT ( FMS_WO_table[Event Type] ),
                ALLEXCEPT ( FMS_WO_table, FMS_WO_table[EQUIP_NO] )
            )
                > 1,
        1
    )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-chuncz-msft

Many Thanks for your reply.

Do I need to add the measure into the visual level filter?

Regards,

Lloyd

 

@limabravo,

 

Yes, you may also try Show items with no data.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.