if (Month = 'Jan', ContractYr1Pctg*Capacity, 'No Value') as [Ref Energy]
The script loads fine, and displays a value of 'Jan' for Month and has values for the other fields, but Ref Energy is showing as '-' in the TableBox. Even if the month is anything other than Jan, I should see 'No Value' in Ref Energy??
I have attached my script. In [RefEngy1], I am getting the Date and constant values. In [REFENGY], I am trying to calculate the Reference Energy, based on what month it is , it should choose a different constant for Reference Insolation.
Even though it is showing the month correctly as 'Jan', it is not producing any values for the Ref Energy, showing up as '-'.
The problem looks to be because the fields ContractYear1Pctg, Capacity are not integers.
When I say,
if (num(Month(Date))= 1, 23,0) as [RefEnergy], I get a value of 23 correctly for Jan, but
If (num(Month(Date))=1,ContractYear1Pctg*Capacity,0) is giving '-' The values for ContractYear1Pctg is 0.794 and Capacity is 5.81. In the tablebox property, I had described these fields as number with precision of 10.