## Voted Best Answer

In a I have one table that has a daily price. another table that has the number of days. I am wanting to multiply one by the other.

**Table 1** with object Name:

m_Days_On_Rent

Is the following calculation: sum(DATEDIFF(day, [Rental].[StartDateTime], COALESCE ([Rental].[EndDateTime] + 1, GETDATE() + 1)))

Object Type = Measure

Data Type = Number

Cumulation = None

**Table 2** with Object Name: Costings_SUM_Price

is the following calculation: sum([ContractSystemType].[Price])

Object Type = Measure

Data Type = Number

Cumulation = None

**In Table 1** i have a manual object

Name:multiply_test

is the following calculation sum{{m_Days_On_Rent}}*{{Costings_SUM__Price}}

Object Type = Measure

Data Type = Number

Cumulation = Cumulative

sum{{m_Days_On_Rent}}*{{Costings_SUM__Price}}

*com.panintelligence.sql.exception.PiSqlException: Incorrect syntax near '{'.*

sum'{{m_Days_On_Rent}}'*'{{Costings_SUM__Price}}'

*com.panintelligence.sql.exception.PiSqlException: Incorrect syntax near '*'.*

sum('{{m_Days_On_Rent}}'*'{{Costings_SUM__Price}}')

*com.panintelligence.sql.exception.PiSqlException: Operand data type varchar is invalid for multiply operator.*

sum({{m_Days_On_Rent}}*{{Costings_SUM__Price}})

com.panintelligence.sql.exception.PiSqlException: Incorrect syntax near '{'.

I have looked through the tables already set up and i cant see any with this requirement to replicate.

m_Days_On_Rent

Is the following calculation: sum(DATEDIFF(day, [Rental].[StartDateTime], COALESCE ([Rental].[EndDateTime] + 1, GETDATE() + 1)))

Object Type = Measure

Data Type = Number

Cumulation = None

is the following calculation: sum([ContractSystemType].[Price])

Object Type = Measure

Data Type = Number

Cumulation = None

Name:multiply_test

is the following calculation sum{{m_Days_On_Rent}}*{{Costings_SUM__Price}}

Object Type = Measure

Data Type = Number

Cumulation = Cumulative

sum{{m_Days_On_Rent}}*{{Costings_SUM__Price}}

sum'{{m_Days_On_Rent}}'*'{{Costings_SUM__Price}}'

sum('{{m_Days_On_Rent}}'*'{{Costings_SUM__Price}}')

com.panintelligence.sql.exception.PiSqlException: Incorrect syntax near '{'.

Status:
Open May 30, 2023 - 04:09 PM

Do you have the same question? Follow this Question

Please wait...

Add New Comment