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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
CourtneyLeah
Frequent Visitor

Filter not working with measure results

Hi,

 

I have a report that looks at all of our health and safety data. One of the filters that I have on this report ensures that only data associated with a date less than or equal to today is shown. This seems to work fine with the raw data and calculated columns. However, when I add a calculated measure to any visual, the filter appears to stop working.

 

I am relatively new to Power BI, so if anyone could explain to me why this is happening and how to go about fixing it, it would be much appreciated.

 

Cheers

1 ACCEPTED SOLUTION

Yeah, I think that might be the issue.

 

Athough this still probably only gives you the latest 12 months.  There are possibly some better techniques to achieve the same thing.  Let us know how you get on.

 

TRIFR
    = (
        CALCULATE (
            SUM ( TRIFR[Fatal] ) + SUM ( TRIFR[Notifiable] )
                + SUM ( TRIFR[Lost Time] )
                + SUM ( TRIFR[Medical Tretment] )
                + SUM ( TRIFR[Reduced Work] ),
            DATESINPERIOD ( DateKey[Date], LASTDATE ( 'TRIFR'[Incident Date]  ), -12, MONTH )
        )
            * 1000000
    )
        / CALCULATE (
            SUM ( TRIFR[Work Hours] ),
            DATESINPERIOD ( DateKey[Date], LASTDATE ('TRIFR'[Incident Date]  ), -12, MONTH )
        )

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

10 REPLIES 10

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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