Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
Solved! Go to Solution.
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:
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:
You can also set up a slicer with the different vehicle names:
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.
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:
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:
You can also set up a slicer with the different vehicle names:
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!!!!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.