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
ThomasDay
Impactful Individual
Impactful Individual

VAR and Brain Cramp

This is really a brain cramp and pretty embarrassing to be honest.  I get athe error "The syntax for 'RESULT' is incorrect" when attempting to calc a column for the code below.   I'm trying to do the snippet shown at the end...which gives the error---and so I whittled it down and down and down to the following which ALSO gives the error, so I clearly don't understand the issue. (This is a calculated column in the same table as [Bed Size]!)  

 

CohortForPerformance =
       VAR SizeCategOfFacil = MeasureReptRecNoProviders[Bed Size]
       RESULT 

       SizeCategOfFacil

 

----And here's the thing I'm trying to do....which is an interim calc for other stuff.  Any help would be great!

CohortForPerformance = 
VAR SizeCategOfFacil = MeasureReptRecNoProviders[Bed Size]
VAR SizeID = Switch (
TRUE(),
SEARCH("400 and over",SizeCategOfFacil,1,0)<>0,"400+",
SEARCH("250 to 399",SizeCategOfFacil,1,0)<>0,"250 to 399",
SEARCH("100 to 249",SizeCategOfFacil,1,0)<>0,"100 to 249",
SEARCH("26 to 99",SizeCategOfFacil,1,0)<>0,"26 to 99",
SEARCH("25 and under",SizeCategOfFacil,1,0)<>0,"25 and under",
"")
RESULT
CONCATENATE("Acute ",SizeID)
1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

Hi @ThomasDay

Use Return instead of Result




Lima - Peru

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.

Top Solution Authors