I am trying to group donations into groups based on the donation close date/time in a Salesforce report.
The formula I wrote is:
IF(Opportunity.Close_Date_Time__c<=2022-09-02 14:00:00,"Group 1","Group 2")
When I validate the formula, I get the error: Syntax error. Missing ')'
From my perspective the problem is here - Opportunity.Close_Date_Time__c<=2022-09-02 14:00:00. You should use DATETIMEVALUE to get value from string.
Could you please try this:
IF(Opportunity.Close_Date_Time__c<=DATETIMEVALUE("2022-09-02 14:00:00"),"Group 1","Group 2")
Related
I have created a custom formula field in a Dataset that has output type as Float. This formula shows correct output in the dataset. But when I put that formula field in a pivot table in a workbook as sum, it shows following error: "Cannot display data. At least one of the custom formula fields combines a function and values that are not compatible. Review the formulas and try again."
I have used this particular script to make the formula field:
CASE WHEN INSTR(TO_CHAR({custbody_pct_oss_config_len_notes#display}),'')>0 THEN
TO_NUMBER(SUBSTR(TO_CHAR({custbody_pct_oss_config_len_notes#display}),0,INSTR(TO_CHAR({custbody_pct_oss_config_len_notes#display}),'#')-1))+5
ELSE
TO_NUMBER(SUBSTR(TO_CHAR({custbody_pct_oss_config_len_notes#display}),0,INSTR(TO_CHAR({custbody_pct_oss_config_len_notes#display}),'#')-1))
END
This script allows only float as output type. So thats what I am stuck with.
Any help will be appreciated!
I am trying to create a report to show employees without something. I have a report type "with/without" that is connecting 2 objects. 1. contact 2. observations
The observation.date__c is the date of the observation. If a contact has not had an observation, the observation.date__ displays "-"
I am trying to either group by this field or replace the "-" with other text.
I have tried to bucket this field, isnull, isblank, if greater than, etc but nothing seems to be working. I get an error saying that I can not use observation.date__c because it is an object.
When I run my query I get the following result.
' 200515200517 10'
This value is stored in varchar field in the table I am pulling from.
When I add this field to my report it is displaying the following:
' 2:00AM200517 10'
What do I need to do so the report will display the actual results and not change the value to a time. Any help will be greatly appreciated.
After playing around I found my issue. I am passing a date parameter as part of the query. I added some formatting logic on the parameter and that resolved the issue.
I have a 4 lines of SQL queries, where I have the following substring query:
SUBSTRING(T2.xxx,1,10) <= SUBSTRING(CONVERT(VARCHAR, T2.xxx, 111),1,10
I am using PySpark to create a HIVE table and push the data with the help of the query. There is no issue with the code as it is working for other SQL type queries. This is an instance where I am facing issues. Below is the error:
pyspark.sql.utils.AnalysisException: u"cannot recognize input near 'CHAR' ',' 'T2' in function specification
I have tried many online suggestions, but none of them work. I came across below link from the Cloudera website
https://www.cloudera.com/documentation/enterprise/release-notes/topics/cdh_rn_spark_ki.html
It says that:
Spark SQL does not respect size limit for the varchar type.
I am not sure if I have quoted the relevant statement here. Can anybody help me understand what I am going through here and how can I rectify the error?
I have a SSRS report which have N number of Columns. I need to hide Certain columns based on a parameter "jobcode" . I have tried below expression in Column Visibility Pane,
=iif(Parameters!JobCode.Value=1,"False","True")
While Executing the report I got below Error,
"The Hidden Expression used in the tablix 'Tablix1' returned a
datatype that is not valid"
I have tried like below,
=iif(Parameters!JobCode.Value=1,0,1)
But, got the same error. Can Anyone help me to find out answers for below queries
How to achieve the above requirement in ssrs?
If I need hide column based on multiple parameter values, say 0 and 1, How to do it?
Thanks for the help.
If JobCode = 0 , Show
=IIF(CInt(Fields!JobCode.Value) = 0,true,false)
Try this.
Follow these steps:
Right click in your column>Column Visibility>Show or hide based on an expression
Expression, use that:
=Parameters!parameter_name.Value<>1