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
mrsgator
Frequent Visitor

Set Points within upper and lower limits

I'm trying to learn how to use DAX and need some help.  I have a set of data that consists of a vehicle name, data_date, set_point_1, independent_sensor_1 and a second table with the set points and their upper and lower control limits.  (Four is not the only set point.)  I'm trying to figure out the DAX to show if the set point is X, upper control limit is Y and the lower control limit is Z, then the independent_sensor_1 is within those limits.  I can set up a slicer with the different vehicle names.  Any help would be greatly appreciated.

 

mrsgator_0-1722269832173.png

 

mrsgator_1-1722269853632.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @mrsgator 

I am glad to help you.   

 

According to your description, you want to figure out the DAX to show if the set point is X, upper control limit is Y and the lower control limit is Z, then the independent_sensor_1 is within those limits? 

 

If I understand you correctly, then you can refer to my solution.  

 

You can refer to my DAX formula to create a Measure: 

vfenlingmsft_0-1722305666826.png

 

WithinLimits = 
VAR SelectedSetPoint =
    SELECTEDVALUE ( 'Table1'[set_point_1] )
VAR UpperLimit =
    LOOKUPVALUE ( 'Table2'[Upper Limit], 'Table2'[Set Point], SelectedSetPoint )
VAR LowerLimit =
    LOOKUPVALUE ( 'Table2'[Lower Limit], 'Table2'[Set Point], SelectedSetPoint )
VAR WithinOrNot =
    SELECTEDVALUE ( 'Table1'[independent_sensor_1] )
RETURN
    IF (
        WithinOrNot >= LowerLimit
            && WithinOrNot <= UpperLimit,
        "Within Limits",
        "Out of Limits"
    )

 

This is the result calculated using this DAX: 

vfenlingmsft_1-1722305666829.png

 You can also set up a slicer with the different vehicle names: 

vfenlingmsft_2-1722305681057.png

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi, @mrsgator 

I am glad to help you.   

 

According to your description, you want to figure out the DAX to show if the set point is X, upper control limit is Y and the lower control limit is Z, then the independent_sensor_1 is within those limits? 

 

If I understand you correctly, then you can refer to my solution.  

 

You can refer to my DAX formula to create a Measure: 

vfenlingmsft_0-1722305666826.png

 

WithinLimits = 
VAR SelectedSetPoint =
    SELECTEDVALUE ( 'Table1'[set_point_1] )
VAR UpperLimit =
    LOOKUPVALUE ( 'Table2'[Upper Limit], 'Table2'[Set Point], SelectedSetPoint )
VAR LowerLimit =
    LOOKUPVALUE ( 'Table2'[Lower Limit], 'Table2'[Set Point], SelectedSetPoint )
VAR WithinOrNot =
    SELECTEDVALUE ( 'Table1'[independent_sensor_1] )
RETURN
    IF (
        WithinOrNot >= LowerLimit
            && WithinOrNot <= UpperLimit,
        "Within Limits",
        "Out of Limits"
    )

 

This is the result calculated using this DAX: 

vfenlingmsft_1-1722305666829.png

 You can also set up a slicer with the different vehicle names: 

vfenlingmsft_2-1722305681057.png

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very 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