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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
TableTopJosh
New Member

Creating Bounds from Measures

Hello,

 

I have a system of tables, including:

- UNITS (Unit No, Last Maintenance Date)

- FAILURES (Unit No, Failure Date, Failure Info, Subsystem, # Days Since Failure)

- DATE_RANGES (Value, Description)

- DATE (Std Date Table)

 

I am trying to create a Matrix that displays the Count of "Failures" in each "Subsystem" for a selected "Unit No" in a specific date range OR specific "# Days Since Failure".

 

I would like to use a Tile Slicer with Single Select to define the date ranges.

 

DATE_RANGES is as follows:

ValueString
71 Week
301 Month
1806 Months
365

1 Year

 

The slicer returns the selected value in Measure "Date_Range_Value".

 

I would like to use the slicer to filter the values of FAILURES based on the "# Days Since Failure", with the lower bound being 0, and the upper bound being "Date_Range_Value".

 

I've already tried creating a measure in the format Filter = IF(MAX(FAILURES[# Days Since Failure]) >= 0 && MAX(FAILURES[# Days Since Failure]) <= [Date_Range_Value], 1, 0) and filtering the visual based on the value of "Filter" = 1, as some older threads suggested. That does not seem to work.

 

Also open to defining a date range based on a Measure "Unit Last Maintenance Date" and "Range End Date". I have those calculating correctly, providing a beginning and end date.

 

Any help would be appreciated.

 

Thank you!

1 ACCEPTED SOLUTION
wardy912
Solution Sage
Solution Sage

Hi @TableTopJosh 

 Here's 2 measures you can try, one using your date_range_value and the other using actual dates. There's not much difference between the 2, so it's just personal preference.

Failures in Range = 
VAR SelectedRange = [Date_Range_Value]
RETURN
CALCULATE(
    COUNTROWS(FAILURES),
    FAILURES[# Days Since Failure] >= 0,
    FAILURES[# Days Since Failure] <= SelectedRange
)

 

Failures in Date Range = 
VAR StartDate = [Unit Last Maintenance Date]
VAR EndDate = [Range End Date]
RETURN
CALCULATE(
    COUNTROWS(FAILURES),
    FAILURES[Failure Date] >= StartDate,
    FAILURES[Failure Date] <= EndDate
)


Please let me know if this helps by giving a thumbs up and marking as solved! Thanks

View solution in original post

2 REPLIES 2
wardy912
Solution Sage
Solution Sage

Hi @TableTopJosh 

 Here's 2 measures you can try, one using your date_range_value and the other using actual dates. There's not much difference between the 2, so it's just personal preference.

Failures in Range = 
VAR SelectedRange = [Date_Range_Value]
RETURN
CALCULATE(
    COUNTROWS(FAILURES),
    FAILURES[# Days Since Failure] >= 0,
    FAILURES[# Days Since Failure] <= SelectedRange
)

 

Failures in Date Range = 
VAR StartDate = [Unit Last Maintenance Date]
VAR EndDate = [Range End Date]
RETURN
CALCULATE(
    COUNTROWS(FAILURES),
    FAILURES[Failure Date] >= StartDate,
    FAILURES[Failure Date] <= EndDate
)


Please let me know if this helps by giving a thumbs up and marking as solved! Thanks

Worked perfectly. Thank you so much!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors