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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
SanderB
Frequent Visitor

Error in formula Result within specification

Dear all,

 

I have a weird error in PowerBI desktop and I hope someone can help me.

 

I'm creating a report with laboratory results and I want to add a # before the result is a result is not within specification.

The table contains: Result, Contol high, Control low and I use the following formula:

U_RPT_VALUE_SPECS = IF(RESULT[U_RPT_VALUE]>=RESULT[U_CONTROL_LOW] && RESULT[U_RPT_VALUE]<= RESULT[U_CONTROL_HIGH];RESULT[U_RPT_VALUE];"# "&RESULT[U_RPT_VALUE])

This works very good, except for the 3 last rows in the matrix table.

First column are the specification: Control = RESULT[U_CONTROL_LOW]&"-"& RESULT[U_CONTROL_HIGH]

Second column contains the first set of results, and the second column the second set.

 

As you can see the last 3 values are not correct interpretated by the formula.

 

Do I miss something?

 

Thank in advance

 

1 ACCEPTED SOLUTION
SanderB
Frequent Visitor

ok, solution was simple.

The result table was set as TEXT and not as Number.

 

Converted the values to Numbers and it works great.

 

For someone who needs a script to check if a value is within specification:

U_RPT_VALUE_SPECS = IF(RESULT[U_CONTROL_LOW]="";RESULT[U_RPT_VALUE];(IF(RESULT[VALUE]>=value(RESULT[U_CONTROL_LOW]) && RESULT[VALUE]<= value(RESULT[U_CONTROL_HIGH]);RESULT[U_RPT_VALUE];"# "&RESULT[U_RPT_VALUE])))

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@SanderB,

 

By the way, you may add conditional column in Query Editor as well.

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.
SanderB
Frequent Visitor

ok, solution was simple.

The result table was set as TEXT and not as Number.

 

Converted the values to Numbers and it works great.

 

For someone who needs a script to check if a value is within specification:

U_RPT_VALUE_SPECS = IF(RESULT[U_CONTROL_LOW]="";RESULT[U_RPT_VALUE];(IF(RESULT[VALUE]>=value(RESULT[U_CONTROL_LOW]) && RESULT[VALUE]<= value(RESULT[U_CONTROL_HIGH]);RESULT[U_RPT_VALUE];"# "&RESULT[U_RPT_VALUE])))

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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
Top Kudoed Authors