How do i calculate two objects from different tables in the sameschema.
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.
We also have documentation around Object Referencing in our Knowledge Base - https://panintelligence.atlassian.net/wiki/spaces/PD/pages/229245007/Object+Referencing - which you might find helpful too.
Add New Comment