Skip to main content
1-Visitor
Aug 2, 2021 10:48 PM UTC
Solved

Units - Joules/Mega/Giga

Hello,

 

I have been trying to work out how to change the units from Joules to MegaJoules/Giga Joules in the question below. When I change this it has "The variable is undefined, check the label set correctly"

 

So the answer should be 279 MJ/hr

 

Badger_1-1627943998743.png

 

Is this a matter of changing something in the settings or assigning this vaue?

 

I have seen other problems with MJ and GJ so know it can be done.

 

Thanks

FredLuskAnswer
14-Alexandrite
Aug 2, 2021 11:47 PM UTC

If you define MJ as a unit, you can use it to label data and results.

 

Type MJ:=10^6

  • Use the right arrow key after ^6 to get back to the main line of the equation. Otherwise, the exponent gets the unit.
  • I often use the triple line equals sign to define units, instead of := so I can put the definitions anywhere within the document.  If you use :=, you must put the unit definitions above where they are used.

Click in MJ and change its label from Variable to Unit.

Now you can use MJ for your data and replace J with MJ for your results.

 

Using a similar procedure, you can also define GJ.

6 replies

FredLusk14-AlexandriteAnswer
14-Alexandrite
Aug 2, 2021 11:47 PM UTC

If you define MJ as a unit, you can use it to label data and results.

 

Type MJ:=10^6

  • Use the right arrow key after ^6 to get back to the main line of the equation. Otherwise, the exponent gets the unit.
  • I often use the triple line equals sign to define units, instead of := so I can put the definitions anywhere within the document.  If you use :=, you must put the unit definitions above where they are used.

Click in MJ and change its label from Variable to Unit.

Now you can use MJ for your data and replace J with MJ for your results.

 

Using a similar procedure, you can also define GJ.

Translate
Badger1-VisitorAuthor
1-Visitor
Aug 3, 2021 12:06 AM UTC

Thanks, Fred, I tried that using:= but didn't realize it needed to be local to the equation.

Translate
ttokoro
21-Topaz I
Aug 3, 2021 3:03 AM UTC

image.pngimage.pngimage.pngimage.png

Translate
t.t.
3-Newcomer
Sep 21, 2026 12:29 PM UTC

@sportzfy I have been trying to work out how to change the units from Joules to MegaJoules/Giga Joules in the question below. When I change this it has "The variable is undefined, check the label set correctly.

You may need to check how the variable is defined and make sure the unit label is set to MJ/hr rather than changing the unit directly in the answer field; the “variable is undefined” message usually indicates that the label or unit assignment isn’t matching the variable definition. I’d also suggest checking the unit settings in the question setup, since MJ and GJ can normally be handled there, and then converting the result so it displays as 279 MJ/hr. If you can share the question setup or variable definition, it should be easier to identify exactly what needs changing.

Translate