Where am I going wrong?

Hi 

 

I got this error: Expression 'IFS( AND([HBA1C] < 42,"20 - 42 mmol/L Your HBA1C levels are within normal limits.", AND([HBA1C] >= 43, [HBA1C] <=47, "43 - 47 mmol/L - Your results indicate that there is impaired glucose regulation and an increased risk of diabetes mellitus. This stage is known as Prediabetes. We recommend that you speak with your GP in this instance to discuss your options. Most of the time, these levels can be brought back into balance by making changes to your lifestyle, such as getting more exerci...' was unable to be parsed: Number of opened and closed parentheses does not match.

 

But I can't see what I am doing wrong. THis is the original formula. 

IFS(
AND([HBA1C] < 42,"20 - 42 mmol/L Your HBA1C levels are within normal limits.",
AND([HBA1C] >= 43, [HBA1C] <=47, "43 - 47 mmol/L - Your results indicate that there is impaired glucose regulation and an increased risk of diabetes mellitus. This stage is known as Prediabetes. We recommend that you speak with your GP in this instance to discuss your options. Most of the time, these levels can be brought back into balance by making changes to your lifestyle, such as getting more exercise, losing weight, drinking less alcohol, and changing your diet with a focus on the Mediterranean diet. We have added some information at the end of this report Optimising Your Lipids. It is important to have a yearly HbA1c test when your levels are within this range. However, please consult with your GP in the first instance.",
AND([HBA1C] >= 48, ">48 mmol/L - Your HbA1C results are consistent with diabetes mellitus or impaired glucose regulation. We recommend that you speak with your GP immediately. These levels can be brought back into balance with medication and by making changes to your lifestyle, such as getting more exercise, losing weight, drinking less alcohol, and changing your diet with a focus on the Mediterranean diet. We have added some information at the end of this report Optimising Your Lipids. However, please consult with your GP immediately.",
TRUE, "Unknown"
)

 

Thanks in advance 

 

 

 

0 4 138
4 REPLIES 4


@Gardener76 wrote:

AND([HBA1C] >= 43, [HBA1C] <=47


 

I think you need to have a closing parenthesis here.

AND([HBA1C] >= 43, [HBA1C] <=47)


 

 


@Gardener76 wrote:

AND([HBA1C] < 42


Also , maybe you wish to have another argument with AND() or you may want to remove AND() if you have just a single argument of 

[HBA1C] < 42

And again


@Gardener76 wrote:

AND([HBA1C] >= 48, "


You may want to have [HBA1C] >= 48

 

 

Are you by any chance looking for the following expression?

IFS(
[HBA1C] < 42,

                         "20 - 42 mmol/L Your HBA1C levels are within normal limits.",

AND([HBA1C] >= 43, [HBA1C] <=47) ,

"43 - 47 mmol/L - Your results indicate that there is impaired glucose regulation and an increased risk of diabetes mellitus. This stage is known as Prediabetes. We recommend that you speak with your GP in this instance to discuss your options. Most of the time, these levels can be brought back into balance by making changes to your lifestyle, such as getting more exercise, losing weight, drinking less alcohol, and changing your diet with a focus on the Mediterranean diet. We have added some information at the end of this report Optimising Your Lipids. It is important to have a yearly HbA1c test when your levels are within this range. However, please consult with your GP in the first instance.",

[HBA1C] >= 48,

">48 mmol/L - Your HbA1C results are consistent with diabetes mellitus or impaired glucose regulation. We recommend that you speak with your GP immediately. These levels can be brought back into balance with medication and by making changes to your lifestyle, such as getting more exercise, losing weight, drinking less alcohol, and changing your diet with a focus on the Mediterranean diet. We have added some information at the end of this report Optimising Your Lipids. However, please consult with your GP immediately.",

TRUE,

"Unknown"
)

 

Thank you. 

 

Yes, I wanted those results, not sure what the end part was as I copied and pasted from another formula that was working... 

Top Labels in this Space